Stitching User Data Between Next.js and Shopify with Mixpanel
hey I'm trying to stitch data between two websites. The flow is: I have a nextjs website using the mixpanel js SDK it has links to some shopify products. The shopify store also uses the mixpanel SDK. Now my usecase is when use goes from my nextjs website to shopify product page mixpanel should identify the user as same. Right now I'm using mixpanel.get_distinct_id() in my nextjs website and setting it as query param to the product link. Now in the Shopify I have added script in the theme.liquid file and getting the query param and using mixpanel.identify(distinct_id) but it doesn't seem to be working. It still assigns some anonymous distinct id to the user due to which in the dashboard it's identified as separate user. Can you help me out here. Also the mixpanel.identify(distinct_id) return -1 not sure why