How to receive Omerlo Ad Events in Google Analytics 4 using Google Tag Manager

Google Tag Manager
Step 1 - Configure Google Tag Manager custom variables
GTM will require a few custom variable definitions to be able to forward important informations to GA4.
Under Variables, User-Defined Variables, configure these variables:
DLV - adClickthroughUrl
Type: Data Layer
Name: adClickthroughUrl
DLV - adCreativeId
Type: Data Layer
Name: adCreativeId
DLV - adFormat
Type: Data Layer
Name: adFormat
DLV - adMediaId
Type: Data Layer
Name: adMediaId
Ad Event Settings
Type: Google Tag: Event Settings
Event Parameters:
Parameter: adCreativeId, Value: DLV - adCreativeId
Parameter: adClickthroughUrl, Value: DLV - adClickthroughUrl
Parameter: adFormat, Value: DLV - adFormat
Parameter: adMediaId, Value: DLV - adMediaId

Step 1 - DataLayer Variables

Step 1 - Event Settings Variable
Step 2- Configure Google Tag Manager custom events
Now that our Data Layer variables are created, let's create our GA4 Event Tags to forward our custom events received in GTM to GA4.
Under Tags, add the following tags:
adImpression
Type: Google Analytics: GA4 Event
Set the measurement ID to you GA4 container using a variable or by entering it manually.
Event name: adImpression
Event Parameter: Select the Event Settings Variable created at Step 1
Add the following trigger:
Custom Event: adImpression
adClick
Type: Google Analytics: GA4 Event
Set the measurement ID to you GA4 container using a variable or by entering it manually.
Event name: adClick
Event Parameter: Select the Event Settings Variable created at Step 1
Add the following trigger:
Custom Event: adClick

Step 2
Step 3 - Configure Custom Definitions in GA4
Now that GTM forwards our Omerlo Ad Events to GA4, let's configure the parameters in GA4 to allow analytics to include the parameter values in reports.
Under Admin, Custom Definitions, add the following Custom Dimensions:
ad_clickthrough_url:
Scope: Event
Event parameter: adClickthroughUrl
ad_creative_id:
Scope: Event
Event parameter: adCreativeId
ad_format:
Scope: Event
Event parameter: adFormat
ad_media_id
Scope: Event
Event parameter: adMediaId

Step 3
Now that our events are correctly configured in GTM and GA4, Omerlo Ad Events should show in Event Dashboard and should be available in reports.

Events in GA4
Publié le 29 août 2024 | Mis à jour le 21 nov. 2024