When Google Tag Manager (GTM) is implemented on the parent page where your Jebbit experience is embedded, you can leverage it to seamlessly track Jebbit events in Google Analytics 4 (GA4). This method allows you to capture detailed user interactions within your Jebbit experience and integrate them into your broader website analytics within GA4.
This article will walk you through the necessary steps to configure GTM for accurate GA4 event tracking of your Jebbit activities.
Before continuing, make sure:
You have set up a Google Analytics 4 Integration with Jebbit.
Google Tag Manager (GTM) is implemented on the parent page.
How it works
Jebbit sends the following events via postMessage
along with the parameters jebbit_campaign_id
and jebbit_source
(which is always set to true):
jebbit_redirect
page_view
completion_node
custom_event
generate_lead
add_to_cart
These events are automatically pushed to the dataLayer
for tracking.
Example data layer event:
dataLayer.push({
event: 'jebbit_redirect',
jebbit_campaign_id: 'YOUR_CAMPAIGN_PUBLIC_ID',
jebbit_source: 'true'
});
Step-by-step guide
1. Create data layer variables in GTM
To capture the custom parameters in GA4 events, you first need to create two data layer variables in GTM for jebbit_campaign_id
and jebbit_source
.
Go to Variables > New.
Give your variable a name.
For the variable type, choose Data Layer Variable.
In the data layer variable name, type
jebbit_campaign_id
.Save the variable.
Repeat the process to create a new variable.
In the data layer variable name, type
jebbit_source
.Save the variable.
2. Create custom event triggers in GTM
After your variables have been created, you need to configure GTM triggers to listen for each of the custom events that your application sends.
Go to Triggers > New.
Give your trigger a name.
Navigate to Trigger Configuration.
Select Custom Event.
Under event name, type the name of the event from the dataLayer (e.g.,
jebbit_redirect
).Save the trigger.
Repeat these steps for each event you plan to capture. For example:
CE - Jebbit Redirect
CE - Page View
CE - Completion Node
CE - Custom Event
CE - Generate Lead
CE - Add to Cart
3. Create event tags in GTM
Finally, you will create GA4 event tags in GTM.
Go to Tags > New.
Give your tag a name.
Navigate to Tag Configuration.
For the tag type, choose Google Analytics: GA4 Event.
(Optional) If your Google Analytics 4 Measurement ID does not auto-populate, copy and paste it.
For the event name, type the name of the event from the dataLayer (e.g.,
jebbit_redirect
).Under Event Parameters:
Navigate to the Triggering section and select the trigger you created above.
Save the tag.
Repeat these steps for each event you plan to capture. For example:
CE - Jebbit Redirect
CE - Page View
CE - Completion Node
CE - Custom Event
CE - Generate Lead
CE - Add to Cart