Integrating Google Tag Manager (GTM) with Mida allows you to send Mida data to GTM.
The Data Layer is a core part of GTM. It's like a storage space where you keep details about what users do on your site. You can then send this data to tools like Google Analytics using Google Tag Manager.
For each experiment, Mida pushes these events to the Data Layer:
mida_pageview: a visitor in the experiment viewed the page
mida_execute: the experiment ran on this page
mida_conversion: the visitor completed one of your goals
Each event includes the following properties:
name: Your experiment profile name
variant: Indicates the variation name (Control / Variant 1 / Variant 2, etc.)
id: Your test ID (e.g., 4898)
Events also carry extra details such as uuid (the Mida visitor ID) and timestamp (when the event happened).
Each event is sent once per experiment per page load. You can use them as Custom Event triggers in GTM and read the properties with Data Layer Variables.
If your Google Analytics 4 integration sends through Google Tag Manager, Mida can also push Google's recommended experience_impression event to the Data Layer. It includes exp_variant_string, for example MIDA-4898-Variant 1 (MIDA, your test ID and the variant name), and is sent once per experiment per page load. This event comes from the GA4 integration, not the GTM one. You turn it on or off with Send experience_impression event in the GA4 integration's Config tab. See GA4 Integration: Tag Settings.
Activate GTM Integration in Mida
Note: Integrating your Mida project with GTM is a one-time setup at the project level.
Project Level Activation
Make sure you're in the right project before enabling GTM.
Ensure BOTH Mida tracking script and GTM code are added on your campaign or experiment page.
Go to Integration in Mida, select Google Tag Manager, and click on 'Enable Now'. That's it! You have enabled GTM integration at the project level!
Experiment Level Activation
Note: Once GTM is connected, the GTM integration is turned on by default for each new experiment. It's still a good idea to double-check that it's enabled in the experiment's CONFIGURATION settings.
Why do I still see Mida events after turning GTM off?
The GA4 integration can also send Mida events to the Data Layer. This happens when GA4 is set to send through GTM, or when gtag isn't on the page, so Mida falls back to the Data Layer.
To stop all Mida events in the Data Layer, go to Integration and pause both Google Tag Manager and Google Analytics 4 for the project. Once an integration is paused, Mida stops sending its events, including for experiments that already had it turned on.



