This article covers the following:
- Overview
- Integrate Wingify With GA4 via GTM
- Create Data Layer Variables
- Create Triggers for the Event
- Create Tags in GTM
- Create a GA4 Connection in Wingify
Overview
Google Analytics 4 (GA4) is the latest version of Google Analytics, which is quite different from the traditional “Universal” Analytics. GA4 is driven by events; i.e., events are essential for presenting data in Google Analytics 4.
One of the advantages of GA4 is that you can use it for a website, an app, or a website and app together. To learn more about GA4, the next generation of Google Analytics.
By integrating your Wingify account with GA4, you will be able to create GA4 audiences right from Wingify and also import your audiences from GA4 to your Wingify account.
Info: Integrating your Wingify campaigns with GA4 via GTM is a one-time setup. You needn’t repeat this procedure for every new Wingify campaign.
Attention: Before proceeding, please verify that the GA4 code is installed on your website. If it's installed directly on the website, please follow the article Integrate Wingify with Google Analytics 4 to set up your Wingify-GA4 integration. Use the integration method described in this article only when your GA4 code is installed via GTM on the website.
Integrate Wingify With GA4 via GTM
Pushing the Wingify campaign data to GA4 via GTM is a four-step process:
- Create Data Layer Variables: These variables are used to create tags and define triggers for events to execute.
- Create Triggers for the Event: The firing rules are conditions that evaluate to either fire or not fire an event to the tags. These allow Wingify to push test data to GTM.
- Create Tags in GTM: Tags are code snippets that finally push the data captured by the variables and fired by the triggers to your analytics tool, such as Google Analytics.
- Create a GA4 Connection in Wingify: Once you’ve configured GTM, the next step is to create a GA4 connection in Wingify.
Create Data Layer Variables
The first step of Wingify<>GA4 integration is to create data layer variables. You must log in to your GTM account and create the following data layer variable with the default value of 0:
Attention: Sections for creating the Wingify-UUID data layer variable, Wingify-ID-Push-GA4-Trigger, and Wingify-ID-Push-GA4-Tag are removed from this article, as they are no longer required for importing GA4 audiences into Wingify via GTM. Though retaining these tags will not cause any impact, we recommend removing them to sanitize your account.
Wingify-Exp-Variant-String This data layer variable is used to send the Wingify campaign and its corresponding variation values to GA4. The format of this variable value will be "Wingify-{campaignId}-{variationId}". To define this variable, perform the following:
- In the Title field, enter Wingify-Exp-Variant-String.
- In the Data Layer Variable Name field, enter wingify_exp_variant_string.
- From the Data Layer Version dropdown, choose Version 2.
- Enable the Set Default Value field, and in the Default Value field, enter the value 0 (zero).
- Click Save.
Create Triggers for the Event
Once you’ve created the data layer variables, the next step is to create the triggers for the events. Triggers are conditions that determine when an event has to be fired to the tag.
To enable Wingify to push campaign data and visitors' UUIDs to GTM, you must create individual triggers for them.
From the GTM dashboard, click Triggers > New and perform the following steps to create a trigger for the Wingify-Exp-Variant-String data layer variable by configuring the following fields:
- In the Trigger Name field, enter Wingify-Data-Push-GA4-Trigger.
- Click on the Trigger Configuration tile, and select Custom Event under Other.
- In the Event Name field, enter wingify-data-push-ga4.
Note: The event name must always be wingify-data-push-ga4. This event is stored in Wingify libraries and pushed when the GA4 integration is enabled for the campaign.
- Click Save.
Create Tags in GTM
Once you’ve created the triggers, the next step is to create the GTM tags. These tags are the code snippets that finally push the data captured by the variables and fired by the triggers to analyze your campaign data inside the analytics tools, such as Google Analytics 4. To complete the process, create the Wingify-Data-Push-GA4 tag in the GTM by performing the following steps:
- In the GTM dashboard, click Tags and select New.
- Click on the Tag Configuration tile, and then select Google Analytics: GA4 Event.
- In the Measurement ID field, enter the GA4 ID of the GA4 account to which the data should be sent.
Note: If you manage multiple GA4 properties through GTM, you do not need to create a separate Wingify connection for each property. Leave the Measurement ID field blank. GTM can then route data to the appropriate GA4 property based on your site's configuration.
- In the Event Name field, enter experience_impression.
- Expand the Event Parameters section, click on Add Row, and in the Parameter Name field, enter exp_variant_string and in the Value field, enter {{Wingify-Exp-Variant-String}}.
Note: The event name should always be experience_impression, and the event parameter should always be exp_variant_string.
- From the Triggering section, choose the Firing Triggers as Wingify-Data-Push-GA4-Trigger.
- Click Save.
Create a GA4 Connection in Wingify
Now that GTM is configured to receive your Wingify data, the next step is to create a GA4 connection in Wingify to forward the data to GA4. For details on setting up the Wingify–GA4 integration, refer to this article.
Need more help?
For more information or further assistance, contact Wingify Support.