Mutiny can push data layer events to Google Tag Manager (GTM) whenever a user views an experience. Below we’ll detail out the information that Mutiny sends to the data layer, enabling you to capture that information and send it to your downstream platforms with GTM tags.
Note: This article documents the process of capturing impression data from Mutiny using Google Tag Manager. If you’re trying to track conversions using Google Tag Manager, take a look at this article instead.
Turning on the integration
To send a data layer event when a user sees a Mutiny experience, you’ll first need to turn on the integration.
- Navigate to https://app.mutinyhq.com/integrations
- Click on the Google Tag Manager card.
- Turn on the Google Tag Manager integration.
Data layer specifications
Whenever a user sees a Mutiny experience, we’ll push an event to the data layer called mutiny_experience_impression . This event will contain the following properties:
- experience_id - The unique id for the experience the user saw.
- experience_name - The name of the experience the user saw.
- segment_name - The name of the Mutiny Segment.
- personalized - This property is set to true if a user saw a personalized variant, and false if a user saw the control.
- variation_name - The name of the variation a user saw.
- variation_key - The unique ID of the variation a user saw.
- experience_type - The experience type. This can contain one of these 4 values:
- on_page - On-page experiences.
- component - Component experiences.
- redirect - Redirect experiences.
- headless - Headless experiences.
An example data layer push will look like this:
dataLayer.push({
"event": "mutiny_experience_impression",
"experience_id": "f81c7603-f083-4ca7-89d8-b2b9438701e1",
"experience_name": "Test Experience",
"experience_type": "on_page",
"segment_name": "All Traffic",
"personalized": false,
"variation_name": "Variation 1",
"variation_key": "6bcb2043-e215-4e8a-97de-7aaaaf22fda8"
})
To capture this data and send it to your downstream platforms, you’ll need to build tags, triggers and variables in your GTM container. The specifics of these assets are highly dependent on which platform you’re trying to send the data to. However, we have built out a template for Google Analytics 4 which you can view here.
Comments
0 comments
Please sign in to leave a comment.