Forward events to GA4
By default, Lyftio pushes events containing experiment information to the dataLayer. This occurs the first time a visitor is exposed to an experiment during a session. Google Tag Manager can be configured to capture this information and forward it to GA4.
With this setup in place, you can segment visitors by variation ID and analyze metrics for each variation in GA4. Note that this is intended as a supplementary tool to help interpret experiment results—not as the primary measure of experiment success.
To accurately compare Lyftio data with GA4, you must create segments for each variation. Without these segments, you cannot determine whether the visitors registered in GA4 were exposed to the experiment, making comparisons irrelevant.
Setup in Google Tag Manager
Log in to GTM and do the following setup to forward Lyftio events to GA4.
Create the variable
Click on Variables and then New.
Give the variable a name and the choose Data Layer Variable as Variable type. Enter exp_variant_string as Data Layer Variable Name and then click Save.
Create the trigger
Click on Triggers and then New.
Give the trigger a name and then choose Custom Event as Trigger Type. Set event name to experience_impression. Then click Save.
Create the tag
Click on Tags and then New.
Give the tag a name and then choose GA4 Event as Tag Type. Enter your Measurement ID and set Event Name to experience_impression. Click on Add parameter and enter exp_variant_string as Event parameter key and then click on the button in the value field and choose your exp_variant_string parameter as value. Then set the triggering to your Lyftio trigger and click Save.
Now publish your new settings and Lyftio events should be forwarded to your GA4 instance.
It can take up to 48 hours before events are visible in GA4 Explorations. However, you should be able to notice these straight away by checking the events part in Realtime overview.