Skip to main content
Tutorial

OpenAI (ChatGPT Ads) Tracking

ChatGPT Ads lets you advertise to shoppers inside ChatGPT. If you run ChatGPT Ads, UltraCart's built-in OpenAI integration reports your StoreFront activity and purchases back to OpenAI, so you can measure which ads drive sales and let OpenAI optimize your campaigns against them.

This tutorial walks you through gathering your OpenAI credentials, configuring tracking on your StoreFront, setting consent, and confirming that events are arriving.

How UltraCart reports conversions to OpenAI​

UltraCart can report each event to OpenAI over two paths, and OpenAI keeps one copy of each event.

  • OpenAI Measurement Pixel: a browser tag UltraCart adds to your StoreFront pages automatically once you save a Pixel ID. There is no code for you to paste.
  • OpenAI Conversions API: a server-to-server feed sent from UltraCart's servers. It is optional and turns on when you also save a Conversions API key. It still reports events when a shopper's browser blocks the pixel, and it reports the purchase as soon as the payment is received, even if the shopper never returns to your receipt page.

Both paths send the same event identifier for the same action. OpenAI keeps whichever copy arrives first, so a purchase is never counted twice. You do not need to configure anything for this to work.

Before you begin​

Gather these values from your OpenAI Ads Manager account:

  • Pixel ID (required): find it in OpenAI Ads Manager under Conversions. The Pixel ID turns on the browser pixel.
  • Conversions API key (optional, recommended): a key from OpenAI Ads Manager that authorizes server-side events. This is not an OpenAI API key for ChatGPT models or the OpenAI platform. A model API key will not work here.

For more detail, see OpenAI's Conversions API documentation: https://developers.openai.com/ads/conversions-api

warning

The Conversions API key is a secret credential. Treat it like a password and do not share it publicly. After you save it, UltraCart never shows it again: the field stays blank, and the page only tells you that a key is saved.

Configure OpenAI tracking on your StoreFront​

  1. Go to Main Menu -> StoreFronts -> [Your StoreFront] -> Conversion Tracking -> Other.

  2. Scroll to the OpenAI (ChatGPT Ads) section.

  3. Fill in the fields:

    • Pixel ID: paste your OpenAI Pixel ID.

    • Conversions API Key: paste your Conversions API key, or leave it blank to use the browser pixel only.

  4. Review the Opt in to setting (see Shopper privacy and consent).

  5. Click Save.

Once the Pixel ID is saved, UltraCart adds the Measurement Pixel to your StoreFront pages. With a Conversions API key saved as well, UltraCart also sends server-side events.

To change the key later, paste the new key and save. Leaving the Conversions API Key field blank keeps the key you already saved. To remove it, check Clear the saved key and save. Clearing the Pixel ID turns off the whole integration, including the pixel and the server-side events.

Tracked events​

UltraCart reports the following StoreFront actions to OpenAI under OpenAI's event names.

StoreFront actionOpenAI event
Page viewpage_viewed
Product or category viewcontents_viewed
Add to cartitems_added
Begin checkoutcheckout_started
Registration or signupregistration_completed
Site searchsite_search (a custom event)
Purchaseorder_created

Begin checkout is counted once per cart, however many times the shopper reloads the checkout. The purchase event carries the order id, order total, currency, and line items. The site search event never includes the words the shopper searched for.

The server-side purchase is sent once per order, when the payment is received. OpenAI does not accept events more than seven days old, so UltraCart does not send any that old.

How click attribution works​

When a shopper reaches your StoreFront from a ChatGPT ad, OpenAI's pixel stores OpenAI's click and browser references in first-party cookies, once the shopper's consent allows it. UltraCart reads those references, keeps them with the shopper's cart, and attaches them to the events it sends, including the purchase sent when the payment lands.

Attribution also uses the shopper's email address and phone number when UltraCart has them, which helps OpenAI match a purchase to an ad when the click references are missing. Both are hashed before they leave UltraCart's servers (see Shopper privacy and consent).

OpenAI tracking respects your StoreFront's privacy settings through the Opt in to setting in the OpenAI (ChatGPT Ads) section. Choose the consent category the shopper must grant and the shoppers it applies to. While the shopper has not granted that category, UltraCart holds back the pixel and the server-side events for them, including the purchase.

By default, the OpenAI section starts with Marketing consent required for EEA Customers, which suits shoppers in the European Economic Area. You can change it before you save the Pixel ID, and UltraCart keeps your choice afterwards. The setting only takes effect when your StoreFront shows its cookie notice to those shoppers.

The email address and phone number UltraCart uses for matching are hashed (SHA-256) on UltraCart's servers before they are placed on the page or sent to OpenAI. Plain-text customer details are never placed on the page or sent to OpenAI.

If a shopper asks you to delete their data from OpenAI, submit that request through OpenAI's own privacy process. UltraCart does not have an OpenAI-facing deletion endpoint to call on your behalf.

Verifying that events are arriving​

Server-side events are delivered by a background process, so allow a short delay between a StoreFront action and the event appearing in OpenAI Ads Manager.

To confirm data is flowing:

  1. Browse your StoreFront, add an item to your cart, and place a test order.

  2. Open OpenAI Ads Manager and check the conversion activity for your pixel. The purchase should appear once, not twice.

  3. If you saved a Conversions API key, check Integration Logs. When OpenAI refuses your key, UltraCart records a critical entry there that says how many events were not delivered. Replace the key on the StoreFront to resume.

note

A test payment method can be set to skip conversion pixels under Configuration → Payments → Test Methods. An order paid with that test method fires no pixels on the receipt page, so place your test order with a test method that does not skip them.

Next steps​

Was this page helpful?