Skip to main content

OpenAI

info

This is a pro feature. Get the pro version here

Setup instruction

  1. Open the OpenAI Ads Manager and go to the Conversions tab.

  2. Create a new pixel and copy its Pixel ID.

  3. In the Pixel Manager, open Tracking Pixels → OpenAI, paste the pixel ID into the Pixel ID field, and click Save.

Conversions API (CAPI)

info

Available from version 1.60.0 of the Pixel Manager.

The Conversions API is an optional addition to your OpenAI pixel that sends conversion data to OpenAI in real time through OpenAI's server-to-server protocol. This provides more accurate conversion tracking, especially for events that might be missed by browser-based tracking due to ad blockers or privacy settings.

Find more information on the Conversions API in the OpenAI documentation.

  1. Open the OpenAI Ads Manager and go to the Conversions tab.

  2. Create an API key for your pixel and copy it.

  3. In the Pixel Manager, open Tracking Pixels → OpenAI (under Show advanced settings), paste the key into the OpenAI Conversions API token field, and save the settings.

note

OpenAI does not use a test event code. Events are validated against your pixel and API key automatically, so there is no separate test field to configure.

Server-Side Proxy

You can offload OpenAI Conversions API calls from your WooCommerce server to the edge using the Server-Side Proxy. This reduces server load and improves tracking accuracy by routing events through a first-party subdomain.

ChatGPT click reference (oppref)

info

Available from version 1.64.0 of the Pixel Manager.

When a visitor arrives from ChatGPT, the landing page URL carries an oppref parameter, OpenAI's click reference that lets OpenAI trace the visitor from the ChatGPT interaction to the final purchase. The Pixel Manager captures the click reference automatically on the landing page, preserves it through checkout, and attaches it to all Conversions API events, including the purchase event. No configuration is needed.

Browser reference (obref)

info

Available from version 1.66.1 of the Pixel Manager.

The OpenAI pixel stores a browser reference in the __obref cookie. The Pixel Manager reads it and attaches it to every Conversions API event as user.obref, including the purchase event sent from the server, so OpenAI can match the server event to the browser in which the ad was clicked. It is only read while marketing consent is granted. No configuration is needed.

Advanced Matching

Advanced Matching is an optional addition to your OpenAI pixel that matches conversion data with the person responsible for the conversion. Advanced Matching sends hashed customer identifiers to OpenAI to match site events. This also lets you track cross-device checkouts, which cannot be done otherwise. As a result, you can see conversions reported in OpenAI Ads Manager more accurately.

Enable it under Tracking Pixels → OpenAI → Advanced Matching.

With Advanced Matching enabled, the Pixel Manager sends the following fields on the browser pixel and on the Conversions API, normalized and hashed the way OpenAI specifies (SHA-256, lowercase hex):

FieldSent as
Email addresshashed
Phone numberhashed, international format without +
First name, last namehashed, lowercase without whitespace and punctuation
Customer ID (logged-in customers)hashed
Billing countryraw, two-letter code
Billing region (state or province)raw name, for example California
Billing cityraw
Billing postal coderaw

The values come from the logged-in customer's profile and, on the order confirmation page, from the order's billing details. The Conversions API takes them in OpenAI's list form (emails_sha256, countries and so on).

note

OpenAI also offers automatic advanced matching, which is switched on per pixel in the OpenAI Ads Manager and lets the pixel detect and hash customer information from the page itself. It works independently of the Pixel Manager's Advanced Matching and can be used alongside it.

The OpenAI pixel is only loaded once the visitor has granted marketing consent. If the visitor withdraws consent later in the cookie banner, the Pixel Manager tells the OpenAI SDK to stop sending events (oaiq("consent", false)), and re-enables it when consent is granted again.

Supported Events

Here's a list of supported events.

The Pixel Manager maps its events to OpenAI's standard event names:

Pixel Manager eventOpenAI event
Page viewpage_viewed
View productcontents_viewed
Add to cartitems_added
Begin checkoutcheckout_started
Purchaseorder_created
Account createdregistration_completed
Subscription with free trial created (WooCommerce Subscriptions)trial_started
First subscription payment (WooCommerce Subscriptions)subscription_created

Conversions API events for an order include each order line with its unit price, the parent product of a variation (group_id) and the chosen variation attributes (variant_dict).

Make more money from your ads with high-precision tracking