Connect AdRoll to your Site: Install the Pixel with Google Tag Manager

Contact your GTM administrator

The instructions in this article are for customers using the 'NextRoll Cookie Consent Banner' or no banner. If you have a Custom Consent Banner, please contact your GTM administrator.

You can connect AdRoll to your site by placing the Pixel via Google Tag Manager (GTM). Google Tag Manager (GTM) simplifies adding and managing multiple tags (scripts), like our Pixel, on your site. Not only is this the easiest method, but the Pixel is less likely to become disconnected from your website when placed with GTM.

Please note that there are other methods to activate your Pixel and connect AdRoll to your site. You must choose only one of the avalailable methods:

  1. Activate the Pixel through GTM. Continue reading to proceed.
  2. Activate the Pixel Manually by adding it your website header. Learn how.
  3. Activate the Pixel by using an Ecommerce Integration. Click one of options below:
Shopify Wix SquareSpace
WooCommerce Prestashop BigCommerce

 

Before you Start

You must have a GTM Account with the required permissions:

  • If you don't already have a GTM account, you can sign up here for free.
  • You must have permissions to manage and publish containers in GTM.
  • Once registered, you’ll be prompted to add an account. If you manage multiple websites, assign an account to each website. An Account in GTM is the equivalent of an Advertiser Profile in AdRoll.
  • If you need more help to get started with GTM, use their Quick Start Guide.

If you are using a Custom Cookie Consent Banner, please contact your GTM administrator. The instructions in this guide only apply to you if you use the NextRoll Cookie Consent Banner, or you don't use a banner.

 

Option 1. Install the Pixel via GTM Manually

This option allows you flexibility and greater control to integrate the Pixel into your own adhoc GTM setup.

 

Step 1. Find and Copy your unique Pixel Code

  • A Pixel Setup Required red banner will appear at the top, click Setup Your Pixel Now.
  • If you haven't yet, select a cookie consent banner and click Save.
  • If the red banner does not appear go to Audiences > Website Audience > View Pixel.
  • Click Copy to retrieve your unique Pixel code.
  • Paste the Pixel code in a document and find the following IDs:
    1. adroll_adv_id = Advertisable ID
    2. adroll_pix_id = Pixel ID
  • You will need to paste these two IDs in the next step.

 

Step 2. Create a New Tag

  • Navigate to Google Tag Manager > Workspace > Default Workspace.
  • Click New Tag and name it AdRoll Base Pixel.
  • Click Tag Configuration.
  • Under Choose tag type scroll down and click on AdRoll Smart Pixel.
  • Enter the corresponding  code into the appropriate fields in your GTM tag:
    • adroll_adv_id = Advertisable ID
    • adroll_pix_id = Pixel ID
    • Leave Conversion Value and Segment Name blank.
  • These IDs can be found in AdRoll under Website Audiences as described in Step 1.
  • Click Continue.

 

Step 3. Select or Create a Trigger

  • Click Trigger Configuration.
  • Select an existing trigger that fires on All DOM Ready Events with Page View - DOM Ready trigger type.
  • If you don't have this trigger available, create a new one from scratch:
    • Click the + icon on the top right corner
    • Name your trigger All Page View - DOM Ready Events Trigger
    • Under Choose a Trigger Type click DOM Ready in Page View.
    • Select All DOM Ready Events
  • Save.
  • Ensure that this trigger is selected as the firing trigger for your new tag as shown below.

Screenshot 2025-07-02 at 5.54.45 PM.png

 

Step 4. Submit and Publish your Container

  • To make these changes live, click Submit on the upper right corner.
  • This will give you the option to name your version, type AdRoll Base Pixel
  • Make sure that you select Live environment
  • And go ahead and click Publish in the top right corner
  • Once this page re-loads your pixel will be placed across your website and you will start seeing traffic being tracked in AdRoll under Website Audiences within a few hours.

 

Option 2. Sign in to GTM to integrate automatically

This quick and easy option allows you to connect AdRoll to your website via GTM by simply signing in to your GTM account and following the prompts.

If you have complex GTM setup, follow the Option 1 to install the Pixel via GTM manually instead. For example if your site is developed as a single page application (SPA), if you want to fire the pixel only on specific pages, or you want to track custom forms and other ad hoc items.

 

If you just created your AdRoll account:

  • You will be presented with the option Google Tag Manager under Let's Connect AdRoll as part of your account creation process.
  • Click Connect to proceed

gif4.gif

If you already have an AdRoll account:

  • A Pixel Setup Required red banner will appear at the top, click Setup Your Pixel Now.
  • Select Google Tag Manager and click Connect to proceed.
  • Next select your Google Account associated with your GTM instance.
  • Click Allow to grant NextRoll all the permissions needed to publish and manage GTM containers.

GIF2.gif

  • Next, Choose your GTM account and container.

Screen_Shot_2020-01-27_at_2.25.56_PM.png

  • You have the option to add Enhanced Conversion Tracking. If you’d prefer not to, simply click Continue

unnamed__1_.png

  • Click Publish.

unnamed__2_.png

 

Enhanced Conversion Tracking via GTM

We recommend configuring Enhanced Conversion Tracking in GTM and custom parameters. Follow the instructions in this article.

 

Stored Revenue Data

If you're unsure where on your conversion page your revenue data is stored, your best option is to consult with your technical team.

The most common places are DOM Elements, Javascript Variables, and DataLayer Variables.

DOM Elements are HTML tags within the page. These include everything from images (<img>), paragraphs (<p>), various inputs (<input>). 

 

Event-Based Audience in Google Tag Manager

Most audiences can be tracked based on the various URLs on your website. However, there are some cases where you want to track audiences that perform a certain action such as the OnClick of a button or submitting a form. To track this audience you'll need to create an event-based audience within your AdRoll dashboard.

Once the audience is created, use the steps below to tie the audience to the OnClick event on your website.

  • In your GTM account, go to Workspace > Default Workspace > Add a New Tag.
  • In the tag configuration, go to Choose tag type > Custom HTML.
  • Copy the event snippet for your audience from the AdRoll dashboard as outlined here.
  • Paste the snippet in the GTM Custom HTML tag, and make sure the code is within <script> tags.
  • Choose an existing trigger for the relevant button's OnClick function or form of success if it exists.
    • If the button trigger does not exist, create a new trigger through these instructions and select your newly created trigger.
  • Enter a name for the tag, save the tag and repeat the process for all other event-based audiences.
  • Publish the workspace.

 

Single Page Application (SPA) in GTM

If you're working with a single page application, here's how to track your conversions.

  • Create a new trigger and name it.
  • Set the Trigger Type to "History Change"
  • Leave the default for This trigger fires on: "All History Changes" 
  • Create a new Custom HTML tag and name it (e.g. "AdRoll - History Changes")
  • Paste the following snippet into the HTML box:

    <script type="text/javascript">
    try {
        __adroll.record_user({});
    } catch(err) {}
    </script>

  • Set the tag to trigger on the All History Changes trigger you just created. It should look like this: 

tagconfig.png

  • Save and publish your changes.
Was this article helpful?
5 out of 9 found this helpful

Articles in this section

Chat with an agent
24/7 Support
Send a support email
24/7 Support