Hello. I have a Shopify store that's Hydrogen 2/he...
# support
f
Hello. I have a Shopify store that's Hydrogen 2/headless. We are using the rudderstack javascript SDK for the front-end site since it is not hosted by shopify directly. We are also using the Shopify rudderstack source to, hopefully, catch the cart-related and purchase events. While both are sending events properly, the anonymous Ids do not align. I assume this is because the Shopify source is running server-side. Is there any way to pass the anonymous id to the shopify source? Or any foolproof way to stitch the identities?
m
Hey There! 👋 Your message has been received by the RudderStack team. We will forward this request to your Technical Account Manager, and they will get back to you shortly. Please use the thread for any additional comments.
Hi Andy, the RudderStack team could not find a way to pass the anonymousIds between the Shopify frontend events and the server side shopify events. However, rudderstack does do identity stitching for Shopify events based on the cart token, and while this method is not fool-proof, RudderStack is able to stitch the identity of the user using this method for about 99% of the cases when there is a purchase.
f
Thank you. I did notice the cart token would be available in both sources. Does this stitching happen automatically?
m
Yes, RudderStack does the stitching automatically.
f
Even if I'm using the JS SDK on the front end? If so, how might I verify this relationship on the back end (in my RS destination)?
m
So for the Shopify client side tracking, Rudderstack automatically inserts the JS SDK on every page, so you do not need to additionally add the JS source. See docs So on the best way to verify this as per me would be through manual testing on your dev environment. Additionally, Shopify provides a dashboard to see the events that were sent, and you could make use of that dashboard, but my knowledge on that is limited.
f
We're using a headless Hydrogen 2 store not hosted by Shopify.
s
Sorry not familiar with the headless Hydrogen store and if the events will be automatically stitched in this case.