Get Started Get Started

Setting Up the OpenAI Ads Pixel and Conversion Tracking via Google Tag Manager (GTM)

The OpenAI Ads Pixel is a tracking script used to measure visitor activity and conversions from your OpenAI ads. Conversion events allow OpenAI Ads to track actions on your website, such as lead form submissions, sign-ups, purchases, and other important interactions.

This article explains how to set up the OpenAI Ads Pixel and conversion events using Google Tag Manager.

Alternatively, you can refer to our article about Setting Up the OpenAI Ads Pixel and Conversion Tracking Directly in Oncord. 

Before getting started, make sure you have:

Setting Up the OpenAI Ads Pixel via Google Tag Manager

Copy the OpenAI Ads Pixel Code

  • Log in to your OpenAI Ads Manager account.
  • Go to Dashboard > Tools > Conversions > Data Source.
  • Click Create in the top right of the page.
  • Select Data Source.
  • Enter a meaningful name for your pixel, for example OpenAI Ads Pixel.
  • Click Create.

Your Pixel ID and setup code are displayed in a pop-up window.

  • Click Copy to copy the Pixel ID.


Create the Pixel Tag in Google Tag Manager

  • Log in to your Google Tag Manager account.
  • Select the container for your website.
  • Click Tags in the left menu.
  • Click New.
  • Enter a meaningful tag name, such as OpenAI Ads Pixel > All Pages.
  • Click Tag Configuration.
  • Click Discover more tag types in the Community Template Gallery.
  • Search for OpenAI Ads Measurement Pixel.
  • Click Add to workspace to add the template.
  • Select OpenAI Ads Measurement Pixel under the Custom tag types.
  • Enter your Pixel ID in the Pixel ID field.
  • Select Page viewed for the event name.
  • Click Triggering.
  • Select Initialization - All Pages.
  • Click Save.

Setting Up OpenAI Ads Conversion Tracking via GTM

In most cases, a conversion is recorded after a visitor submits a form or completes a sign-up process. It is recommended to redirect visitors to a dedicated thank-you page after the action is completed, as this makes conversion tracking easier to configure.

In this example, the standard Lead conversion event will be used.

Create a Trigger in Google Tag Manager

First, create a trigger that identifies when a visitor reaches your thank-you page.

  • Log in to your Google Tag Manager account.
  • Select your container.
  • Click Triggers in the left menu.
  • Click New.
  • Enter a meaningful trigger name, such as OpenAI Ads Conversion Lead > Fire On Thank-you Page.
  • Click Trigger Configuration.
  • Select Page View.
  • Choose Some Page Views.

Configure the trigger conditions:

  • Select Page URL as the variable.
  • Choose the appropriate condition.
  • Enter a value that identifies your thank-you page.

For example:

  • Variable: Page URL.
  • Condition: contains.
  • Value: thank-you.

This configuration will fire the trigger whenever a page loads with thank-you somewhere in its URL.

  • Click Save.

Create an OpenAI Ads Conversion Tag

Next, create an OpenAI Ads conversion tag that will fire when the trigger is activated.

  • Click Tags in the left menu.
  • Click New.
  • Enter a meaningful tag name, such as OpenAI Ads Lead Conversion Tag > Thank-you Page.
  • Click Tag Configuration.
  • Select OpenAI Ads Measurement Pixel under the Custom tag types.
  • Enter your Pixel ID in the Pixel ID field.
  • Select Lead created for the event name.

Assign the Trigger

  • Click Triggering.
  • Select the trigger you created in the previous step, OpenAI Ads Conversion Lead > Fire On Thank-you Page.
  • Click Save.

Test the Conversion Event

Before publishing your changes, test the tag to confirm it is firing correctly.

Use Google Tag Manager Preview Mode

  • Click Preview in Google Tag Manager.
  • Open your website.
  • Navigate through the conversion process until you reach the thank-you page.
  • Check that both the pixel tag and the conversion tag appear under Tags Fired.

Publish the Tag

Once the conversion event is firing correctly:

  • Return to Google Tag Manager.
  • Click Submit.
  • Publish the container changes.

Your Lead conversion event is now configured and will be sent to OpenAI Ads whenever a visitor reaches the thank-you page.