Google Tag Manager + GA4
ABlyft includes built-in features for analyzing experiments at a goal-oriented level.
If additional details are needed, it is possible to integrate ABlyft with Google Analytics 4 (GA4).
This integration can be accomplished through Google Tag Manager (GTM).
On this page
ABlyft GTM integration
The integration will trigger an event in the dataLayer whenever a visitor encounters or views an experiment. GA4 will receive this data and enable filtering options for analysis. ABlyft provides a native GTM integration (custom integrations are also an option).
- Access ABlyft by logging in.
- Navigate to the left-side menu and choose Integrations.
- Activate the GTM integration.

The dataLayer will now be available with the following information:
- Project ID
- Project name
- Experiment ID
- Experiment name
- Variation ID
- Variation name
Create variables (GTM)
Variables enable the saving of data from the dataLayer.
Workspace
To make sure nothing interferes with the project, create a new workspace first.
- Open GTM.
-
Optionally, select Default Workspace, and click the + icon to create a new workspace.
- Name:
ABlyft > GA4 connection
- Description:
Using the dataLayer to send ABlyft events to GA4.
- Name:
Variable 1 - Project ID
Move to Variables on the left-side menu.
Create and save New variable (1).
Name | dlv - ABlyft - project_id |
Variable Type | Data Layer Variable |
Data Layer Variable Name | project_id |
Data Layer Version | Version 2 |

Variable 2 - Project name
Create and save New variable (2).
Name | dlv - ABlyft - project_name |
Variable Type | Data Layer Variable |
Data Layer Variable Name | project_name |
Data Layer Version | Version 2 |
Variable 3 - Experiment ID
Create and save New variable (3).
Name | dlv - ABlyft - experiment_id |
Variable Type | Data Layer Variable |
Data Layer Variable Name | experiment_id |
Data Layer Version | Version 2 |
Variable 4 - Experiment name
Create and save New variable (4).
Name | dlv - ABlyft - experiment_name |
Variable Type | Data Layer Variable |
Data Layer Variable Name | experiment_name |
Data Layer Version | Version 2 |
Variable 5 - Variation ID
Create and save New variable (5).
Name | dlv - ABlyft - variation_id |
Variable Type | Data Layer Variable |
Data Layer Variable Name | variation_id |
Data Layer Version | Version 2 |
Variable 6 - Variation name
Create and save New variable (6).
Name | dlv - ABlyft - variation_name |
Variable Type | Data Layer Variable |
Data Layer Variable Name | variation_name |
Data Layer Version | Version 2 |

Create trigger (GTM)
To ensure Google Analytics recognizes a visitor's participation in an experiment, it's necessary to establish a trigger.
Access the **Triggers** page via the left-side menu.
Create and save a New trigger with the following details:
Name | ABlyft GA4 trigger |
Event name | ablyft-viewed-experiment |
This trigger activates on | All Custom Events |

Create GA4 Tag (GTM)
Create New tag.
Name | ABlyft GA4 |
Tag type | Google Analytics: GA4 event |
Measurement ID |
Get the measurement ID from GA4. The measurement ID might already be available via a variable if it was already configured. |
Event name | ablyft-viewed-experiment |
Add Event Parameters:
project_id | {{dlv - ABlyft - project_id}} |
project_name | {{dlv - ABlyft - project_name}} |
experiment_id | {{dlv - ABlyft - experiment_id}} |
experiment_name | {{dlv - ABlyft - experiment_name}} |
variation_id | {{dlv - ABlyft - variation_id}} |
variation_name | {{dlv - ABlyft - variation_name}} |
Select trigger: ABlyft GA4 Trigger
Save

Validation
- Publish changes in GTM.
- Update default workspace in GTM.
- Launch GA 4.
- Access the appropriate property.
- Select Reports from the menu on the left.
- Proceed to the Real-time page.
- Observe the card titled Event count by Event name.
- Open a new incognito browser window and navigate to the page with the experiment.
- After a few minutes, revisit the Event count by Event name card in GA4.
- Verify if
ablyft-viewed-experiment
is present; if so, click on it. - Additional events will be shown.
Please note It can take up to 48 hours before the data is available in other reports.

Learn how to access the ABlyft GA4 events to analyse experiments.