Overview
This guide goes over how to install the Wunderkind Smart Tag and Conversion Pixel via Google Tag Manager (GTM), as well as how to create event triggers to send data to Google Analytics 4. Both the Tag and Pixel are code snippets that are specific to a website, and can be found accompanying the initial integration email you received from your Wunderkind point of contact.
The Tag is placed on all pages of a site, while the Pixel is only placed on pages that represent a successful order and/or user conversion.
Table of Contents
- Create a New Tag
- Configure an Event Trigger for the Tag
- Install the Conversion Multi-Pixel
- Create Event Triggers and Variables for GA4
1. Create a New Tag
- Select New Tag > name it “Wunderkind Tag” > and click “Choose tag type”
- Select “Custom HTML” as your tag type, and then paste the Wunderkind Tag
3. Update any Advanced Settings > Tag firing priority
If you’re also placing the Conversion Pixel through GTM, it’s important to set the Tag firing priority so the Tag loads before the Conversion Pixel. For example, if we set the Tag priority to “5”, the Conversion Pixel priority should be 4 or below.
2. Configure an Event Trigger for the Tag
We recommend setting the Tag to load on All Pages, with type: “Page View”.
3. Install the Conversion Multi-Pixel
There are two components to the Conversion Pixel file: a javascript pixel and an image pixel. These need to be added separately in GTM. See this page for more information about the Pixel, including fields for data mapping.
- Create a New Tag > Custom HTML > Label it “Wunderkind Conversion Pixel 1”
- Copy/paste only the javascript portion of the Conversion Pixel. It’ll start/end with <script></script>
- Be sure to map the variables in the pixel to data elements from your order confirmation.
3. Create a custom trigger for confirmation pages
Custom triggers are specific to your website, and must be determined/defined by the parameters of your website. It must target all pages of your site that represent a successful order.
4. Follow the steps above for the Conversion image pixel
- Create a New Tag > Customer HTML > Label it “Wunderkind Conversion Pixel 2”
- Copy/paste only the image portion of the Conversion Pixel. It’ll start/end with <img></>
- Be sure to map the variables in the pixel to data elements from your order confirmation.
4. Create Event Triggers to pass Wunderkind events to GA4
In order to send Wunderkind Onsite campaign data to GA4, you’ll need to create an Event Trigger for each Wunderkind event:
- Wunderkind Impression
- Wunderkind Click
- Wunderkind Submit
After that, you’ll create Variables to pass data attributes with the above events.
First, create your Custom Event Triggers
- Select Triggers > New
- Click Trigger Configuration and choose Trigger Type = Custom Event
- Enter your first Event Name, “Wunderkind Impression”. Select Use Regex Matching, and choose this trigger to fire on All Custom Events.
- Name the Trigger after the Custom Event you created and click Save.
- Follow the steps above to create a Custom Event Trigger for the remaining Wunderkind events - “Wunderkind Click” and “Wunderkind Submit”.
Note that the Event names need to be exact matches to the below. For example an event name of “WKND Impression” is not supported and will fail to send Wunderkind events to GA4.
- Wunderkind Impression
- Wunderkind Click
- Wunderkind Submit
Next, create your Variables
You’ll be setting up Variables to pass “Wunderkind” as an Event Category, and dynamically pass the Wunderkind Campaign Name as an Event Label.
- Select Variables > New
- Select Variable Configuration and choose Variable Type = Data Layer Variable
-
Enter your first Data Layer Variable Name for Event Label as indicated below, with the double nested curly brackets. Keep all other values as they are defaulted..
- {{event_label}}
- Name the Variable after the Data layer Variable and click Save.
-
Repeat the Variable creation steps in order to create the Event Category variable:
- {{event_category}}