Mida + Google Tag Manager integration

Push Mida experiment events to the dataLayer so you can fire any tag in GTM based on the variant a visitor saw.

Analytics & Data Data out Client-side Works with Mida A/B Testing & Personalization

About Google Tag Manager

Google Tag Manager (GTM) is Google's free tag management system that lets marketing teams deploy and update tracking pixels, analytics tags, and other JavaScript snippets without engineering involvement. GTM stores all of its data in a global window.dataLayer array, which makes it the perfect routing layer for experiment events.

How the Google Tag Manager integration works

Mida pushes mida_pageview, mida_execute, and mida_conversion events directly to window.dataLayer with the test ID, test name, variant, and Mida user ID. From there you can build GTM triggers and forward those events to any destination GTM supports — Google Ads, Floodlight, Meta CAPI, LinkedIn Insight, Snap, TikTok and 100+ more.

Requirements

  • Google Tag Manager container installed on the page.
  • Mida tracking code installed on the page.

Use cases

Fan out experiment events to every ad platform

Configure a single GTM trigger on mida_conversion and have it fire your Meta CAPI, Google Ads, LinkedIn, and TikTok conversion tags simultaneously. One A/B test → uplift attributed correctly across every paid channel.

Conditionally fire tags based on the variant a user saw

Use the variant variable in a GTM trigger condition to fire a heavier marketing tag (e.g. live chat, on-site survey) only on the test variant — useful when you want to A/B test the impact of adding a tag itself.

Send experiment data to your data warehouse

Pair the GTM integration with a server-side GTM container or a Snowflake/BigQuery streaming tag to land Mida exposure events directly in your warehouse for long-term experiment analysis.

Debug variant assignment with GTM Preview mode

Open GTM Preview, navigate to a test page, and watch mida_pageview and mida_execute fire in the data layer. The cleanest way to verify Mida is bucketing a visitor before you ship a test.

Shared data

Mida and Google Tag Manager exchange the following events:

Event Direction Description
mida_pageview Data out Pushed to dataLayer on every page after variant assignment.
mida_execute Data out Pushed to dataLayer only when a test executes on the current page.
mida_conversion Data out Pushed to dataLayer when a Mida conversion goal is reached.

Frequently asked questions

Do I still need the GA4 integration if I have the GTM one?

No. If you already use GTM to send events to GA4, the GTM integration is enough — your existing GA4 tags will pick up the Mida events automatically.

Will Mida load GTM for me?

No. Mida only writes to the dataLayer; you must install the GTM container snippet yourself.

Can I rename the dataLayer events?

Not currently. The names are fixed (mida_pageview, mida_execute, mida_conversion) so GTM triggers can be configured once and shared across customers.

Ship A/B tests 10x faster — connected to your stack

Mida is the lightweight A/B testing and personalization platform that integrates with the tools you already pay for.