Google Analytics 4 (event only)

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.

G4 & AB Tasty

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

Integration

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 here.

Now that you have your Measurement ID, you can set up the integration in AB Tasty:

  1. Access Integrations > Integration Hub.
  2. Search for and select Google Analytics 4 (events).
  3. Click Setup connector.
  4. Give a name to your connector so you can easily retrieve it.
  5. Fill the Measurement ID field with your own and click Connect.
  6. Click Save and create connector.

The integration is now set up and will be available in the "Advanced options" step of your campaigns. 

Heads up ⚡
You must update the AB Tasty tag to make your changes live.

Good to Know 💡

To send your campaign data to GA4, you must select the GA4 tool from the Third-party Integrations section of the 'Advanced options' step of your campaign (step 6). If your campaign is already live, data will be sent from the moment you add your GA4 tool (it is not retroactive).

GA4 custom dimension setup

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: 

  1. Click Admin.
  2. In the Properties column, click Custom definitions.
  3. In the Custom dimensions tab, click Create custom dimensions.
  4. 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.
  1. Click Save.

Here are examples of how you can set up the custom dimension for the AB Tasty event parameters: 

Capture_d_e_cran_2023-05-30_a__15.18.28.pngCapture_d_e_cran_2023-05-30_a__15.18.41.png

Integration check

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. 

  1. Open the console and click the Network tab
  2. 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)
  3. 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.

Integration_Guide_Analytics_Tools_18__1_.png
You can also see the AB Tasty campaign data within Google Analytics 4: 

  1. In the Real-Time report (only the events that are currently received are displayed here)

    Integration_Guide_Analytics_Tools_19__1_.png
  2. In the event report (you will need to wait for the events to be collected and processed by Google Analytics).
    Integration_Guide_Analytics_Tools_20__1_.png

Troubleshooting area

In case you need support, follow the instructions given in the articles below:

Was this article helpful?

/