Hi folks. Does anyone have any experience using th...
# ask-questions
Hi folks. Does anyone have any experience using this Shopify integration with GA4? https://docs.growthbook.io/integrations/shopify I have it working up to a point (features and metrics) but can't get experiments working. As far as I can see the 'experiment_viewed' event is not sent, as it is in other GB implementations. This part of the docs suggests it should work automatically, but do I need to add tracking myself?
Copy code
When a user views an experiment, the code above will fire an event that tracks which variation the user saw. If you have Google Analytics 4 (GA4) or Segment installed on your store, you don't have to do any additional configuration. If, however, you need to use a different analytics provider, you can follow our guide here.
Hi Tom 👋 We have lots of folks using Shopify with GA4 and BigQuery. I assume you are using the pre-built <script> tag, right?
Could you send me some screenshots to illustrate what's going on?
Also, if the URL of the web page you're running the Visual Editor experiment on is publicly accessible, could you send it to me so I can take a look?
Hi @brief-honey-45610 thanks for taking a look. There is a public URL, though it is just a dev store: https://cambraydesignlimited.myshopify.com/ Using the GA4 Debugger for Chrome I can see the standard GA4 events being sent and also if you click where it says "Image banner" a custom event is sent, which is intended to be the metric. Unlike other implementations I can't see the "experiment_viewed" event being sent though, although this is visible in the data layer.
I am indeed using the standard script tag
As a related question, I would like to use clientId to determine feature rollout. I can extract this on the Shopify site but can you point me to anything on how to set this as an attribute as you would when creating the GB instance?
Hi @brief-honey-45610, still struggling with this, the links provided was passworded but attached is a screenshot from GA4 Debugger of the data layer. I can see the experiment viewed event there but it is not ending up in GA4 or Big Query. I suspect I'm missing something obvious but any pointers appreciated 🙏
Hi Tom, I haven't forgotten about you. We are catching up on support requests from the holiday weekend in the US.
Thank you! I meant to message but I did actually come up with a solution - sending the experiment_viewed event explicitly via a custom event tracking function worked fine. The issue before seemed to be that the event was added to the data layer but did not sent to GA4, and this may be a GTM configuration issue. I'm curious about it but I don't think there is any issue on the GB end.
Hi Tom, thanks for the update. I"m glad to hear you got it sorted! It can be tricky getting GTM, GA4, GrowthBook and BigQuery all working together.