4

I have setup a Google Optimize server side experiment (linked to GA4) following their documentation in this link. Once I start running the test and after a few days, I can see the experiment impression events coming through on both Analytics and the Optimize experiment report page. The primary objective for this experiment is a conversion event we have on GA4 called add_to_cart, which is triggered every time the user clicks on the add to basket button. So when the page loads, our server side code decides the user variant and we trigger the experiment_impression event. Up to this point everything seems fine. After that the add_to_cart conversion event is triggered whenever the add to basket button is clicked. I have checked on the network tab that those events are being triggered correctly.

However, I get 0 events for every variant of my experiment on the Google Optimize report:

Optimize reporting 0 events for add_to_cart conversion event

It seems Google Optimize thinks the experiment is not running when the user clicks "add to basket" (even though we trigger the experiment_impression event) and therefore it considers that the add_to_cart conversion event doesn't belong to our experiment, hence the lack of reporting.

Could somebody please help me understand what is wrong with this setup? Is there a way to somehow link our add_to_cart conversion event with our server side experiment?

Thank you

dcapilla
  • 171
  • 6
  • Did you figure out whether this was because of the server-side call? Seeing this as well with Google Optimize connected to a GA4 property, with the conversion event triggered on a different site (marketing site -> app site) that has the same GA4 data stream. The events show up in GA4 but not in Google Optimize. – David Oct 11 '22 at 17:30
  • Hey @David - Sorry, I haven't been able to figure out what's wrong with this yet. I've also tried to get some support from Google with no luck. I believe it is related with the fact that the experiment is run server side, if we implemented it via client side it would link the events correct. However, we don't want to do client side for performance reasons. – dcapilla Oct 13 '22 at 09:50

1 Answers1

0

After carrying out a full review in our setup, we noticed there was something wrong with our Google Tag Manager and the Experiment Impression tag wasn't firing as expected. In order to discover this, we used the "Preview" button in our GTM dashboard to check which tags were being fired, that's how we discovered that the tag wasn't firing properly. After fixing the issue and checking that the tags are firing, we now get Conversion events displayed on the Google Optimize experiment report and everything seems to be working as expected. So please, if you have this issue check that your tags are firing correctly.

dcapilla
  • 171
  • 6
  • Glad you finally fixed your issue and I've just managed to fixed mine! I missed prefixing the experimental id to the variant id field, doh - variant_id: {experimentid}.{variantid} – seanjacob Oct 26 '22 at 13:53
  • nice one @seanjacob - I had that issue too before I bumped into this one! – dcapilla Oct 27 '22 at 15:33