Skip to main content
All CollectionsIntegrationsAnalytics Integrations
GA4 Integration via Google Tag Manager
GA4 Integration via Google Tag Manager
Esther Vermeil avatar
Written by Esther Vermeil
Updated over a year ago

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

Click on Triggers

2. Click on New

Click on New

3. Click on Trigger Configurationā€¦

Click on Trigger Configurationā€¦

4. Click on Custom Event

Click on Custom Event

5. Type "yieldify_impression"

Type "yieldify_impression"

6. Click on Trigger Configurationā€¦

Click on Trigger Configurationā€¦

7. Type out the trigger name

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

Click on Variables

2. Click on New

Click on New

3. Click on Variable Configurationā€¦

Click on Variable Configurationā€¦

4. Click on Data Layer Variable

Click on Data Layer Variable

5. Type "yieldify_campaign_action"

Type "yieldify_campaign_action"

6. Type in highlight

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

Click on Tags

2. Click on New

Click on New

3. Click on Tag Configurationā€¦

Click on Tag Configurationā€¦

4. Click on Google Analytics: GA4 Eventā€¦

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

Select GA4 Tag from Configuration Tag

6. Type "yieldify_impression"

Type "yieldify_impression"

7. Click on Triggeringā€¦

Click on Triggeringā€¦

8. Click on yieldify_impressionā€¦

Click on yieldify_impressionā€¦

9. Click on Event Parameters

Click on  Event Parameters

10. Click on Add Row

Click on Add Row

11. Type "yieldify_campaign_name"

Type "yieldify_campaign_name"

12. Click on Value - Tag Configurationā€¦

Click on Tag Configurationā€¦

13. Select the existing data layer variable ā€œyieldify_campaign_nameā€

Click on 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

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

Did this answer your question?