How to explain visitor difference: Optimizely vs. Google Analytics?
We are tracking our Optimizely experiments in Google Analytics using custom dimensions. In Optimizely we see 725 visitors in this experiment, while segmenting data in GA shows us that only 126 people were involved in this test.
How can we explain this difference? Custom dimension has been enabled since the beginning, reporting in GA is set for the same period as the experiment was live.
It seems that Optimizely is reporting way more visitors than we actually had on our site (according to GA)?
Hope you can help, thanks!
Another Dutchie here (looking at the screenshot at least). Where are you loading the tracking codes for both Optimizely and Google Analytics? Is there any difference in their location in the code and are you using Universal Analytics?
We use the Segment (https://segment.com/docs/integrations/optimizely/) to load our tooling, incl. (universal) GA. Optimizely snippet was below the Segment snippet, just pushed a fix to load the Optimizely snippet immediately after our opening <head> tag.
However, not sure if this loading GA before Optimizely is an explanation for the difference in numbers we see?
How are you determining if a user saw the experiment in GA? Are you using the Optimizely integration to set the dimension in GA? if so, then you definitely want to load Optimizely before GA, otherwise there is a race condition going on. (Even with Optimizely first, the race still exists, but Optimizely will start winning the race more often.)
If your GA code loads and fires its tracking request before Optimizely has set the dimension, then the hit will be recorded without the information.