To integrate Yieldify and GA4 via Google Tag Manager (GTM), you will need to configure your GTM to read the dataLayer events that Yieldify pushes and send these to your chosen GA4 property. You will need to configure a tag for each event.
Each tag will need to send parameters associated with variables in the datalayer and be triggered by a custom event specific to yieldify
The screenshots below display the followning Triggers, Variables, and Tags requried for Yieldify and GA4 to be fully integrated:
Triggers
Variables
Tags
Each Tag should send the corresponding parameters associated with it's event. The parameters for each of the four events can be found here.
To build the above, please take the following steps in Google Tag Manager:
Create custom triggers
1. Click on Triggers
2. Click on New
3. Click on Trigger Configuration…
4. Click on Custom Event
5. Type "yieldify_impression"
6. Click on Trigger Configuration…
7. Type out the trigger name
8. Click on Save
9. Repeat the process this time for the following triggers creating the following.
yieldify_close
yieldify_form_submit
yieldify_click
10. Once complete you should have the following triggers
Create datalayer variables
1. Click on Variables
2. Click on New
3. Click on Variable Configuration…
4. Click on Data Layer Variable
5. Type "yieldify_campaign_action"
6. Type in highlight
7. Click on Save
8. Repeat the process for the remaining parameters
yieldify_campaign_id
yieldify_campaign_name
yieldify_campaign_stage
yieldify_campaign_variant
yieldify_element_id
Create tags
1. Click on Tags
2. Click on New
3. Click on Tag Configuration…
4. Click on Google Analytics: GA4 Event…
5. Select your GA4 tag if available or enter the GA4 measurement ID.The instructions on where to find your measurement ID follow this Note it starts with “G-” e.g. G-Y8CYJS8CN8
6. Type "yieldify_impression"
7. Click on Triggering…
8. Click on yieldify_impression…
9. Click on Event Parameters
10. Click on Add Row
11. Type "yieldify_campaign_name"
12. Click on Value - Tag Configuration…
13. Select the existing data layer variable “yieldify_campaign_name”
14. Add all the relevant parameters associated with the event name. This is an example of ‘yieldify_impression’
15. Type in highlight
16. Click on Save
17. Repeat the process for each event name. List of the events and their parameters can be found here.
Note:-
"Yieldify GA4 form submit" has an extra parameter. "yieldify_element_id"
"Yieldify GA4 click" has an extra two parameters.
"yieldify_element_id" and "yieldify_campaign_action"
Testing and Validation
Once you have completed the setup you can check that the events are passing through to GA4 in real time by manually pushing events to the dataLayer in the developer console. These verifying that these are coming through to your Analytics platform.
For ease of copying
window.dataLayer.push({
event: 'yieldify_impression',
'yieldify_campaign_name': 'Yieldify testing analytics',
'yieldify_campaign_variant': 'b',
'yieldify_campaign_stage': 1,
'yieldify_campaign_id': 12345,
});
You should see the event appear in the Real time dashboard in google analytics