Google Analytics (event only)
Was this helpful?
Was this helpful?
Google Analytics is an analytics service that enables you to measure traffic and engagement across your websites and apps. Google Analytics 4 is the latest version of Google Analytics.
The Google Analytics 4 integration allows you to send the AB Tasty campaign data to your Google Analytics property.
AB Tasty campaign data is sent as an event with event parameters:
Event name is “abtasty”
Event parameter abtasty_campaign contains the Campaign ID and Campaign Name formatted as [campaign_id] campaign_name
Event parameter abtasty_variation contains the Variation ID and Variation Name formatted as [variation_id] variation_name
Before setting up the Google Analytics 4 integration within AB Tasty you will need to find your Google Analytics 4 Measurement ID.
Good to Know đź’ˇ- Google Analytics 4 Measurement ID The Google Analytics 4 Measurement ID is the unique identifier of the data stream that sends data to your Google Analytics property. The Measurement ID uses the format G-XXXXXXX. To retrieve your GA Measurement ID, access the Google Analytics interface and click Admin > Property > Data Streams > Web, and choose your data stream. GA Measurement ID appears at the upper right. More info .
Now that you have your Measurement ID, you can set up the integration in AB Tasty:
Access Integrations > Integration Hub.
Search for and select Google Analytics 4 (events).
Click Setup connector.
Give a name to your connector so you can easily retrieve it.
Fill the Measurement ID field with your own and click Connect.
[Optional] Check the box to automatically add the connector to your future campaigns.
Click Save and create connector.
If you have checked the box, the connector will be automatically added to the Advanced step of your future campaigns. However, it is not applied retroactively to previously created campaigns.
You can also modify this behavior from the Integration hub, by editing your connector configuration (check or uncheck box).
Heads up ⚡ You must update the AB Tasty tag to make your changes live.
Once you have the AB Tasty events flowing into your GA4 property, you have to set up custom dimensions for the abtasty_campaign and abtasty_variation event parameters so you can easily access them in the GA4 reports.
To create a custom dimension in GA4:
Click Admin.
In the Properties column, click Custom definitions.
In the Custom dimensions tab, click Create custom dimensions.
Complete the following information:
Dimension name: Enter a unique name for the dimension. You can't use hyphens in the name, but you can use underscores and spaces instead.
Scope: Choose a scope for the custom dimension.
Description: Enter a memorable description for the custom dimension.
Event parameter/User property: Choose the source of data.
Click Save.
Here are examples of how you can set up the custom dimension for the AB Tasty event parameters:
Once you have set up the Google Analytics 4 integration and activated it in an AB Tasty campaign, you may want to verify that data is sent correctly to your Google Analytics property.
Heads up ⚡ To QA the integration, you must be affected by a campaign where the integration has been configured.
Open the console and click the Network tab
In the search bar, type in your Google Analytics 4 Measurement ID (the one you used to set up the integration). You will normally see several lines containing your Measurement ID, which corresponds to the different data that is sent to Google Analytics (not only from AB Tasty but also by the Google Analytics tag)
Look for the line that contains the AB Tasty event and event parameters in the payload. If you find it, it means that AB Tasty campaign data is sent to Google Analytics.
AB Tasty gives you the possibility to export the EmotionsAI audience of the visitors by the time we push the campaign hit. Thanks to this information, you will be able to segment all visitors exposed to an AB Tasty campaign.
This is currently part of an Early Adopters program. Please contact your CSM to benefit from it.
Without this activation, we are not able to send the EmotionsAI audience to GA4. For more information on how to activate EmotionsAI, please contact your CSM.
The campaign hit we send by default is included inside an event called “abtasty”. We want to send the EmotionsAI audience at the same time as this event, but it’s linked to a user.
That’s why you need to create a custom dimension as a user to retrieve this information.
Click Admin.
In the Properties column, click Custom definitions.
In the Custom dimensions tab, click Create custom dimensions.
Complete the following information: Dimension name: Enter a unique name for the dimension. You can't use hyphens in the name, but you can use underscores and spaces instead. We recommend entering “Audience Emotion AI” Scope: Choose User Description: Enter a memorable description for the custom dimension. Event parameter/User property: Please enter “audience_emotion_ai”
Click Save.
If your custom dimension is not set correctly, even if we’re sending the EmotionsAI audience, you won’t be able to retrieve it. We’re sending this information as a user property.
Please refer to the Integration check section to check whether data has been sent correctly or not. For the EmotionsAI audience specifically, information is available inside up.audience_emotion_ai
Sometimes, the EmotionsAI audience is not set before the sending of the AB Tasty campaign hit. That’s why, even if you have activated the EmotionsAI audience, the value will be empty. Indeed, when a new visitor is coming to your website, the campaign hit is sent once AB Tasty is triggered; while 30 seconds are necessary to detect to which EmotionsAI audience the visitor belongs.
Please consult these two videos that explain how to integrate GA4 with AB tasty:
In case you need support, follow the instructions given in the articles below:
If you left the box unchecked (default behavior), your connector won't be added automatically. You can still decide to send campaign data to your connector by selecting it from the Advanced options step of your campaign. More information on how to link a campaign is .
You can also see the AB Tasty campaign data within Google Analytics 4:
In the Real-Time report (only the events that are currently received are displayed here)
In the event report (you will need to wait for the events to be collected and processed by Google Analytics).
You must activate EmotionsAI from your AB tasty account .
đź’ˇ đź’ˇ