This repository contains the Google Tag Manager web tag template for the OpenAI Ads Measurement Pixel. It lets advertisers install and configure the pixel without writing custom JavaScript.
To import the template manually:
- In Google Tag Manager, open Templates.
- Under Tag Templates, select New.
- Open the overflow menu and select Import.
- Choose
template.tplfrom this repository. - Review the requested permissions and save the template.
Once the template is available in the GTM Community Template Gallery, install it from Templates > Tag Templates > Search Gallery instead.
Create an OpenAI Ads Measurement Pixel tag for each event you want to measure:
- Enter your OpenAI Ads Measurement Pixel ID.
- Leave Send a measurement event when this tag fires enabled.
- Select the event and provide any applicable event fields.
- Choose the GTM trigger for that event.
- Save the tag and publish the container.
Use the same Pixel ID for every OpenAI Ads Measurement Pixel tag in the container.
You may also create an optional base tag that only initializes the pixel:
- Disable Send a measurement event when this tag fires.
- Use an Initialization or All Pages trigger.
Event tags initialize the pixel themselves, so the base tag is not required.
The per-event opt-out field can use a GTM Data Layer Variable that resolves to
true, false, or an empty value.
Use GTM Preview before publishing:
- Confirm the expected OpenAI Ads Measurement Pixel tag fires.
- Confirm the configured event is sent.
See the OpenAI Ads measurement pixel documentation for event definitions, field requirements, data layer examples, and additional setup guidance.
To report a security issue, follow SECURITY.md.
Copyright 2026 OpenAI
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.