Guides
Log In
Guides

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

  1. Add the base pixel.
  2. Add event pixels (or URL-based conversions).
    • Add an event pixel to GTM using a template. 👈 (you are here)
  3. 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:

  1. Add an event-based conversion.

In GTM:

  1. Add an event trigger.

    This may require custom development.

  2. 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.

  1. Open Taboola Ads, and select the account (top, right) that you will use to track conversions.

  2. Select the TRACKING tab (top).

  3. Click on + CREATE (far right) and select Conversion.

  4. 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.

  5. For Conversion Type, select EVENT:

  6. (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.

  7. Select the relevant Category - e.g. Complete Registration.

  8. Confirm that the Event Name is complete_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.

  9. (Optional) If desired, edit the following fields:

    1. Click Through Conversion Window
    2. View Through Conversion Window
  10. (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.

  11. (Optional) If relevant, clear the Include in total value checkbox.

  12. (Optional) If desired, edit the following fields:

    1. Audience Properties
    2. Aggregation Type
  13. Skip the Event Code section.

    (We will use GTM to insert the relevant code.)

  14. Review your chosen settings, and click on Create (bottom, right):

👍

Tip

While the TRACKING screen is open, copy your Account ID (top, left).

You will need this for the GTM setup (next section).

GTM setup

Open your GTM container

  1. Open Google Tag Manager.

    (You may be prompted to log in with Google.)

  2. 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.

  3. 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:

  1. In the navigation panel (left), select Triggers:

  2. Click on New (top, right):


  3. Click on the Trigger Configuration card.

  4. Choose the relevant trigger type, and configure it as needed.

    See: Tips & Techniques > Trigger Types (below).

  5. Click on Save (top, right):

Add the GTM tag

In your GTM dashboard:

  1. In the navigation panel (left), select Tags.


  2. Click on New (top, right):


  3. Click on the Tag Configuration card.

  4. Under Custom, select Taboola 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).

  5. 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).

  6. For Pixel Type, selectEvent pixel.

  7. 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.)

  8. Click on the Triggering card, to set up a trigger for this event.

  9. 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).

  10. Once your tag configuration is complete, click on Save (top, right):

  11. 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

  1. Other team members are making changes in the same GTM workspace.
  2. You want to confirm your setup before you publish it.
  3. You want to test why a tag is not working as expected.

In your GTM dashboard:

  1. Click on Preview (top, right).

  2. Enter the URL of the page where the customer journey begins (e.g. the landing page). Then click on Connect:

    1. The Tag Assistant is opened in a new tab.
    2. If the connection is successful, your webpage is opened in a separate window.
  3. Once a connection is made, click on Continue.

  4. Review the Output window to see which tags were fired:

  5. Click on the Close icon (top, left) to stop debugging:

  6. 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.

  1. Click on Submit (top. right).
  2. Review the Workspace Changes.

    This is the set of changes that will be deployed.

  3. (Optional) Enter the following fields:
    1. Version Name - e.g. "Taboola Event Pixel - Subscription Event"
    2. 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.

  4. While you wait for GTM to publish your changes, sing like no one is listening :)
  5. 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

If you have not yet added the Taboola Pixel template, follow the steps below:

  1. In the navigation panel (left), select Templates:

  2. In the Tag Templates section, click on Search Gallery:


  3. Search for a template called Taboola Pixel.

    Make sure that the exact name of the template is Taboola Pixel.

  4. Select the template and click on Add to workspace:

  5. In the confirmation pop-up, click on Add.

Obtaining your Account ID

  1. 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.

  2. Select the TRACKING tab (top).

  3. 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

If 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:

  1. In the navigation panel (left), select Triggers:

  2. Click on New (top, right):


  3. Click on the Trigger Configuration card.

  4. Choose Page View as the trigger.

  5. Choose Some Page Views.

  6. Select Page URL and contains and type in a fragment of the URL - e.g. "thankyou.php".

  7. Once your tag configuration is complete, click on Save (top, right):

  8. When prompted, enter a descriptive name for the trigger - e.g. Subscription Event Trigger.

Case 2 - Thank You pop-up

If 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)

  1. Prepare a Data Layer event code snippet. For example:
    window.dataLayer = window.dataLayer || [];
    window.dataLayer.push({
      'event': 'registrationComplete'
    });
    
  2. Ask your web developer to update your registration funnel so that the above script is fired for each successful registration.
  3. (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:

  1. In the navigation panel (left), select Triggers:

  2. Click on New (top, right):


  3. Click on the Trigger Configuration card.

  4. Choose Custom Event (under Other) as the trigger.

  5. Type in an event name, exactly as it appears in the Data Layer event code snippet that you prepared above - e.g. registrationComplete.

  6. Click on Save (top, right):


  7. 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

📘

GTM Preview