Add event pixels in Google Tag Manager (using a template)
Add Taboola event pixels to GTM (Google Tag Manager) using a template.
Taboola pixel - End-to-end flow
- Add the base pixel.
- Add event pixels (or URL-based conversions).
- Add an event pixel to GTM using a template. 👈 (you are here)
- Verify your setup.
Custom development
Depending on the event that you need to track, custom development may be required.
For an overview of the availble flows, see: Event pixels
Overview
Now that you have added the base pixel to your website, you are ready to add 1 or more event pixels.
Event pixels enable you to track conversions and gather important insights - e.g. ROAS (Return On Ad Spend).
To add the event pixel using a template, follow the guidelines below.
URL-based conversions
URL-based conversions rely on the base pixel only - they do not require an event pixel.
Shopify store owners
For Shopify store owners, we recommend using the Taboola Shopify app.
High-level flow
Tracking an event-based conversion requires the following steps:
End-to-end flow
In Taboola Ads:
- Add an event-based conversion.
In GTM:
- Add an event trigger.
This may require custom development.
- Add the event pixel tag.
The
Event Name
fields in GTM and Taboola Ads (first step, above) must have identical values.
Tip
At certain points in this article, you may be referred to Tips & Techniques (below).
In that case, use the browser back button to return to your original location.
With the above flow in mind, let's get started.
Taboola Ads Setup
Create an event-based conversion
The instructions below illustrate the steps for setting up a registration event.
Other conversions - e.g. a purchase event - require slightly different steps.
For additional guidelines, see the Help Center.
-
Open Taboola Ads, and select the account (top, right) that you will use to track conversions.
-
Select the
TRACKING
tab (top). -
Click on
+ CREATE
(far right) and selectConversion
. -
Type in a
Conversion Name
of your choice - e.g.Complete Registration
.This is a descriptive name for your convenience. It need not match any value in GTM.
-
For
Conversion Type
, selectEVENT
: -
(Optional) If relevant, fill in a
Fixed Value
.Tip: If the event includes a dynamic value - e.g. a purchase event - leave this field blank. For additional guidelines, see the Help Center.
-
Select the relevant
Category
- e.g.Complete Registration
. -
Confirm that the
Event Name
iscomplete_registration
.The
Event Name
fields in Taboola Ads and GTM must have identical values.
Otherwise, Taboola will not be able to receive events passed by GTM. -
(Optional) If desired, edit the following fields:
Click Through Conversion Window
View Through Conversion Window
-
(Optional) If relevant, clear the
Include in total conversions
checkbox.Tip: Always include the most important conversions, so that the Taboola algorithm will optimize towards them. For additional guidelines, see the Help Center.
-
(Optional) If relevant, clear the
Include in total value
checkbox. -
(Optional) If desired, edit the following fields:
Audience Properties
Aggregation Type
-
Skip the
Event Code
section.(We will use GTM to insert the relevant code.)
-
Review your chosen settings, and click on
Create
(bottom, right):
Tip
While the
TRACKING
screen is open, copy yourAccount ID
(top, left).You will need this for the GTM setup (next section).
GTM setup
Open your GTM container
-
Open Google Tag Manager.
(You may be prompted to log in with Google.)
-
Under
Container Name
(left), click on the relevant container.Note the
Container ID
("GTM-XXXXXXXX"
) on the far right.You can change your selection later, by clicking in the top, left corner.
-
Select a workspace (top, left), or just use the
Default Workspace
:
Add a GTM trigger
If you prefer, you can perform this step later, while adding the event pixel (next section).
In your GTM dashboard:
-
In the navigation panel (left), select
Triggers
: -
Click on
New
(top, right):
-
Click on the
Trigger Configuration
card. -
Choose the relevant trigger type, and configure it as needed.
See: Tips & Techniques > Trigger Types (below).
-
Click on
Save
(top, right):
Add the GTM tag
In your GTM dashboard:
-
In the navigation panel (left), select
Tags
.
-
Click on
New
(top, right):
-
Click on the
Tag Configuration
card. -
Under
Custom
, selectTaboola Pixel
.To filter the list, click on the search icon
(top, right) and type in
"Taboola"
.If the
Taboola Pixel
template is not present, see: Tips & Techniques > Adding the Taboola Pixel template (below). -
Fill in the
Taboola Account ID
for the account that you used to create the conversions.Tip: To find your Account ID, see: Tips & Techniques > Obtaining your Account ID (below).
-
For
Pixel Type
, selectEvent pixel
. -
Select the relevant
Event Name
from the dropdown provided - e.g.complete_registration
.The
Event Name
fields in Taboola Ads (above) and GTM must have identical values.(Not to be confused with the
Conversion Name
field in Taboola Ads, which is merely descriptive.) -
Click on the
Triggering
card, to set up a trigger for this event. -
Select the trigger that you created above (previous section), or click on the
+
icon (top, right) to define one on-the-fly.See: Tips & Techniques > Trigger Types (below).
-
Once your tag configuration is complete, click on
Save
(top, right): -
When prompted, enter a descriptive name for the tag - e.g.
Taboola Event Pixel - Subscription Event
.
At this stage, your changes are not live - you still need to publish them.
Preview your changes (optional)
Although, you have added the tag within GTM, your changes are not live yet - you still need to publish them.
You can optionally preview (test-drive) your changes before you publish them. If you prefer to publish your changes immediately, skip ahead to the next section.
The
Publish
action will publish all recent changes - including changes made by other team members within this GTM workspace.
When to use preview
- Other team members are making changes in the same GTM workspace.
- You want to confirm your setup before you publish it.
- You want to test why a tag is not working as expected.
In your GTM dashboard:
-
Click on
Preview
(top, right). -
Enter the URL of the page where the customer journey begins (e.g. the landing page). Then click on
Connect
:- The Tag Assistant is opened in a new tab.
- If the connection is successful, your webpage is opened in a separate window.
-
Once a connection is made, click on Continue.
-
Review the
Output
window to see which tags were fired: -
Click on the
Close
icon (top, left) to stop debugging: -
Once you are done with the Tag Assistant, close the browser tab.
Publish your changes
The
Publish
action will publish all recent changes - including changes made by other team members within this GTM workspace.
- Click on
Submit
(top. right). - Review the
Workspace Changes
.This is the set of changes that will be deployed.
- (Optional) Enter the following fields:
Version Name
- e.g."Taboola Event Pixel - Subscription Event"
Version Description
- e.g."Added the Taboola Event Pixel - Subscription Event"
.
The above fields can help when reviewing a history of changes to your GTM container.
- While you wait for GTM to publish your changes, sing like no one is listening :)
- Once published, a summary page appears.
What's next?
Well done! You have added an event pixel, and set up your event-based conversion!
Next, you should verify that everything is running smoothly.
Tips & Techniques
The sections below contain different tips & techniques that can help with your integration.
Adding the Taboola Pixel
template
Taboola Pixel
templateIf you have not yet added the Taboola Pixel
template, follow the steps below:
-
In the navigation panel (left), select
Templates
: -
In the
Tag Templates
section, click onSearch Gallery
:
-
Search for a template called
Taboola Pixel
.Make sure that the exact name of the template is
Taboola Pixel
. -
Select the template and click on
Add to workspace
: -
In the confirmation pop-up, click on
Add
.
Obtaining your Account ID
-
Open Taboola Ads, and select the account (top, right) that you are using to track conversions.
Make sure to select the Taboola account that you are using to track conversions.
-
Select the
TRACKING
tab (top). -
Copy the numeric
Account ID
on the screen (top, left):
Trigger types
Depending on the trigger type, custom development may be required. Some sample use cases are presented below.
Case 1 - Separate Thank You
page
Thank You
pageIf a successful registration loads a separate Thank You
page (with its own URL), you can set up a GTM trigger without custom development.
Alternatively, you could set up a URL-based conversion in Taboola Ads, and skip the event pixel setup altogether. However, for the purpose of this example, we will use an event-based conversion.
Your flow would look something like this:
GTM dashboard
In your GTM dashboard:
-
In the navigation panel (left), select
Triggers
: -
Click on
New
(top, right):
-
Click on the
Trigger Configuration
card. -
Choose
Page View
as the trigger. -
Choose
Some Page Views
. -
Select
Page URL
andcontains
and type in a fragment of the URL - e.g."thankyou.php"
. -
Once your tag configuration is complete, click on
Save
(top, right): -
When prompted, enter a descriptive name for the trigger - e.g.
Subscription Event Trigger
.
Case 2 - Thank You
pop-up
Thank You
pop-upIf the Thank You
message displays on the same page - e.g. via a pop-up - some custom development is needed.
Your flow might look something like this:
dataLayer.push
(Requires custom development)
- Prepare a Data Layer event code snippet. For example:
window.dataLayer = window.dataLayer || []; window.dataLayer.push({ 'event': 'registrationComplete' });
- Ask your web developer to update your registration funnel so that the above script is fired for each successful registration.
- (Optional)
Preview
your website in the GTM dashboard, and confirm that the event is fired.> See Preview your changes (above)
You are now ready to set up the event in the GTM dashboard (next section).
GTM dashboard
In your GTM dashboard:
-
In the navigation panel (left), select
Triggers
: -
Click on
New
(top, right):
-
Click on the
Trigger Configuration
card. -
Choose
Custom Event
(underOther
) as the trigger. -
Type in an event name, exactly as it appears in the Data Layer event code snippet that you prepared above - e.g.
registrationComplete
. -
Click on
Save
(top, right):
-
When prompted, enter a descriptive name for the trigger - e.g.
Subscription Event Trigger
.
Additional resources
In-depth coverage of GTM and the GTM Data Layer is beyond the scope of this article. For your convenience, some additional resources are provided below.
GTM Data Layer
- Google Tag Manager Custom Event Trigger Exlained (An in-depth tutorial for beginners)
- The data layer (The official GTM docs)
GTM Preview
- A Guide To Google Tag Manager Preview Mode (An in-depth tutorial for beginners)
Updated about 2 months ago