Skip to main content

Google Tag Manager (GTM) Pixel & Event Set Up Instructions

How to install our pixel and event code within Google Tag Manager (GTM)

If you use Google Tag Manager (GTM) to manage tags for your website, you can add the Roku Pixel through your Google Tag Manager account to measure and optimize the performance of your Roku Ads Manager advertising campaigns.

Continue reading to learn:

Looking for instructions outside of Google Tag Manager? Consider browsing these articles:


How to install the Roku Pixel using Google Tag Manager

  1. Sign into Roku Ads Manager, and go to the Events page

  2. Click Connect with a Partner

  3. Copy the Event Group ID

  4. In your Google Tag Manager account, go to the Templates section and click 'Search Gallery'

    1. Picture 1802312386, Picture
  5. Search for ‘Roku,’ and add the Roku Pixel template

    1. Picture 477104024, Picture
  6. Return to the Google Tag Manager overview page, and click ‘New Tag’

    1. Picture 1191306509, Picture
  7. Edit the Tag Configuration by clicking the pencil icon in the right-hand corner of the module

    1. Picture 380331013, Picture
  8. Paste your recently copied Event Group ID, then select your event type

    1. Picture 77118232, Picture
  9. Click the pencil icon in the Triggering module to configure the associated trigger. Save your tag configuration.

  10. Picture 1248612647, Picture

  11. If you are installing more than one event, repeat steps 4–8 for each additional event. When selecting the event type in Step 7, ensure you choose the event name that corresponds to the specific action you’re tracking.

    1. For example, a trigger for a Purchase event could be loading an order confirmation page, and the event name would be “Purchase.”


How To Pass Custom Parameters in GTM (optional)

You can augment your event data with additional metadata to unlock more advanced reporting capabilities - such as tracking Return on Ad Spend (ROAS) and order value.

These metadata fields also support powerful use cases like deduplicating events across the JS Pixel and Conversions API, manually passing identifiers like phone numbers and email addresses, applying custom privacy settings, and more. You can learn more about the different metadata fields here.

To configure Pixel metadata using Google Tag Manager, follow these steps:

  1. Within the Tag Configuration fly out, click the ‘Event Metadata’ dropdown to expose the settings

    1. Picture 690500840, Picture
  2. Click ‘Add Row’ and fill in the ‘Key’ and ‘Value’ fields. The ‘Key’ field should include the metadata name, and the ‘Value’ field should include the metadata field value.

    1. Picture 190944381, Picture

How to Send User Identifiers (Email, Phone) via GTM

Passing hashed email and phone number with your events improves match rates. Roku's event schema accepts these as em (email) and ph (phone) fields inside user_data. GTM has a built-in variable type for capturing this data called User-Provided Data.

  1. Create a new metadata Row using the steps in the previous section.

  2. For email us em as the key, and for phone use ph.

  3. Create a User-Provided Data variable. In GTM, go to Variables > New > Variable Configuration > User-Provided Data. Choose a configuration mode:

    • Automatic (recommended): GTM scans your site for form fields (email, phone, name, address) and captures them automatically. Easiest option if you don't already have this data in your data layer.

    • Manual: Map existing GTM variables (e.g., a Data Layer or DOM Element variable) to the email/phone fields.

    • Code: Point to a Data Layer Variable or Custom JavaScript variable that returns a structured user-data object, e.g. {email: "...", phone_number: "..."}.

  4. Name the variable and Save.


Congrats! You have now implemented event tracking for Roku Ads Manager!

Note: In roughly 6 hours, you should see events start to accrue within the Events page of Roku Ads Manager.

Did this answer your question?