This article describes how to add the Google Analytics 4 integration to your account
Evolv AI provides public integrations for Google Analytics 4 (GA4) using Gtag or Google Tag Manager (GTM).
Table of Contents
- Selecting the correct GA4 integration
- Adding the integration to your Evolv AI account
- Adding the integration to an environment
- Setting up Google Tag Manager (for GTM implementation only)
- Reporting in GA4
Selecting the correct GA4 integration
Evolv AI supports two different methods for integrating with GA4.
- Via the Google tag (Gtag)
- Via Google Tag Manager
The integration you select depends on how GA4 is implemented on your website.
To check, open the network tab in developer tools and look for either /gtag/js or /gtm.js. If you have any doubts, please ask your developers or IT team.
Adding the integration to your Evolv AI account
- Open the Evolv AI Manager and go to the Integrations page.
- Click on the ADD PUBLIC INTEGRATION drop-down.
- Select the appropriate GA4 integration for your website.
- Refer to selecting the correct GA4 integration.
- Click the CREATE button to finish adding the integration to your account.
Adding the integration to an environment
- Go to the Environments page.
- Select an existing environment or create a new one.
- Select the INTEGRATIONS tab.
- Select the integration from the ADD INTEGRATION drop-down and press the SAVE button.
Setting up Google Tag Manager
The GTM integration pushes events to the data layer. You can follow these steps to create a GA4 event tag in Google Tag Manager to send the event data to your GA4 property.
The new tag requires a custom trigger and set of dataLayer variables.
- Create a new trigger with the following configuration.
- Trigger Type: Custom Event
- Event name: evolv
- This trigger fires on: All Custom Events
- Create multiple new variables with the following configuration.
- Variable Type: Data Layer Variable
- Data Layer Version: Version 2
Data Layer Variable Name Variable Name evolvEventDetails.eid Evolv Experiment ID evolvEventDetails.name Evolv Project Name evolvEventDetails.group_id Evolv Project Group ID evolvEventDetails.cid Evolv Combination ID evolvEventDetails.type Evolv Event Type evolvEventDetails.ordinal Evolv Combination Ordinal evolvEventDetails.excluded Evolv Excluded
- Create a new tag with the following configuration.
- Tag Type: Google Analytics: GA4 Event
- Event Name: evolv
- Event Parameters:
- Use Google Tag Manager's PREVIEW option to test the new Evolv GA4 event tag.
- Publish the container when you're ready to commit the changes.