Magefan 2 sends your store's conversion events — page views, product views, add to cart, begin checkout, purchases, registrations and leads — to OpenAI Ads Manager, so you can measure how people interact with your store right after they click your ChatGPT ads. It supports both the browser-side OpenAI Pixel and the server-side Conversions API (CAPI).
In this guide, you'll learn how to set up OpenAI Ads Pixel ID and Conversions API key in OpenAI Ads Manager, configure the connection between your Magento store and OpenAI Ads account, and test that everything works before running any ads.
Installation and Updates
Navigate to your Magefan account and the Magefan extensions management guide to learn how to install OpenAI Ads Conversion Tracking Extension.
Types of OpenAI Ads Tracking
Magefan Open AI Ads Extension allows you to set up both web (Pixel) and server-side (Conversions API) tracking. While you can use them separately, it's recommended to use both for a more accurate data tracking when people decline cookies or use ad blockers.
- OpenAI Ads Pixel — the extension inserts the pixel directly into your website code. If someone declines cookies or uses ad blockers when visiting your store, the pixel won't send any data to OpenAI Ads Manager to comply with data privacy regulations. For the Pixel, you don't need to create any events inside OpenAI Ads Manager, the extension creates and pushes them automatically.
- OpenAI Ads Conversion API — the extension tracks users' actions on your store and sends them via server to OpenAI Ads Manager server. This reduces data inaccuracy and makes sure you receive only accurate reports about users' actions on your store. For the server-side Conversion API, you need to create events inside OpenAI Ads Manager.
Note: OpenAI Ads Extension works with built-in event deduplication, so it only tracks events that weren't tracked by the pixel if you use both the pixel and the Conversion API.
Setting Up OpenAI Pixel and Conversions API
Before configuring the Magefan OpenAI Ads extension, you need an OpenAI Pixel ID and a Conversions API key. Both are created from the OpenAI Ads Manager.
OpenAI Ads Pixel
Sign in to OpenAI Ads Manager if you already have an account and open the Tools > Conversions tab. Then create a new Data Source.
![]()
All you need to do is give it a Name.
![]()
Then copy the Pixel ID and save it for later. This ID identifies your store to OpenAI and is used by both the browser Pixel and the Conversions API.
![]()
Note: OpenAI will offer you to create Conversion events to start tracking, but you don't need it since Magefan's OpenAI Ads extension already tracks and sends pixel events to the Ads Manager.
You'll always find all of your Pixel IDs under Tools > Conversions.
![]()
OpenAI Ads Conversion API
Note: you need to set up a Data source that the Conversion API will send data to, before you set up a Conversion key.
Once you're in the Tools > Conversions tab, click on a key icon in the top left menu.
![]()
Here's where all your conversion keys are stored. Click Create new key and give it a Name.
![]()
The system will generate the key for you, so Copy or Download it for later. This key authenticates the server-to-server requests the extension sends whenever the Conversions API is enabled.
![]()
Important: the conversion key in OpenAI Ads is generated only once, so if you just copied it and then lost it, you need to create a new key.
If you want to use the OpenAI Conversions API, you also need to set up the events in the OpenAI Ads Manager account. Just choose the Data Source the event should be assigned to, set the Base event and the Conversion name.
Here's the list of events Magefan OpenAI Ads Extension tracks:
- View Page (page_viewed)
- View Product (contents_viewed)
- Add To Cart (items_added)
- View Checkout (checkout_started)
- Checkout Success Page (order_created)
- Registration Completed (registration_completed)
- Lead Created (lead_created)
- View Item List (view_item_list)
Duplicate all events in your OpenAI ads account while setting up the Conversion API key, or later by clicking Tools > Conversion > Create (menu) > Conversion Event.
![]()
All conversion events tracked by the pixel and Conversion API are stored in the Tools > Conversion > Conversion Events tab.
![]()
Once you finish setting up your OpenAI Ads conversion pixel and API, you can connect it to your admin panel.
General Settings
Navigate to Stores > Configuration > Magefan Extensions > OpenAI Ads to enable and configure the extension.
General
- OpenAI Pixel ID — the Pixel ID you generated from the Conversions tab in OpenAI Ads Manager. This is required for both the browser Pixel and the Conversions API, since both channels report to the same pixel.
- Events — the list of Magento store actions the extension tracks, each mapped to its corresponding OpenAI standard event.
![]()
Note: pixel tracks and sends them to OpenAI Ads Manager automatically.
Conversions API
The Conversions API sends events directly from your server to OpenAI, independently of the visitor's browser.
- Enable Conversions API — turns server-side event tracking on or off, in addition to the browser OpenAI Pixel.
- Access Token — the Conversions API key you generated from the Conversions tab in OpenAI Ads Manager.
![]()
Pro tip: it's recommended to use both Pixel and the Conversions API together, not one or the other. The extension sends the same event ID through both channels so OpenAI can deduplicate them and avoid counting a single event two times.
Product Attributes Mapping
Product matching ensures products are identified correctly.
- Product Identifier — defines the product attribute that is sent to OpenAI to identify each product in an event.
![]()
Note: use the identifier that matches how your product catalogue is set up in your ChatGPT product feed or catalog integration, if you use one.
Events
The events section allows you to keep event payloads small on categories with very large product counts.
- Maximum Number of Items in View Item List — limits how many products are included in a single view_item_list event. Set to 0 or leave empty for no limit.
![]()
Page Speed Optimisation
Here you choose how to load the OpenAI pixel script to avoid loading delays.
- Enable Deferred Script Load — if enabled, the OpenAI Ads pixel JavaScript only loads after the visitor's first click, scroll, or touch, instead of on initial page load. This improves your store's page speed and Core Web Vitals scores.
![]()
GDPR/CCPA/LGPD
This section allows you to track data for OpenAI Ads according to the data privacy regulations.
- Protect Customer Data — when enabled, no data is sent to OpenAI Ads until the customer provides consent.
- Load Pixel Script Before Consent — defines whether the Pixel script itself is allowed to load before consent is provided.
![]()
Testing Events
Before you enable any campaign, check how events are firing directly in the OpenAI Ads Manager.
Navigate to Tools > Conversions > Event Stream and click Start polling. Then go to your website and go through the entire funnel, from page view to purchase or registration.
![]()
The browser events should appear in a few seconds while server events might take a little longer to load.
![]()
Each event is logged with some data, click on the event to see it and check how deduplication works if you're using both pixel and Conversions API. There should be no same order tracked in the OpenAI Ads Event Stream.
![]()
Note: if you see obvious duplicate counts for the same event or order, double-check that both channels are sending events for the same pixel.
Multi-store Tracking
If you have multiple stores, you can set up multiple data sources for each store view in the OpenAI Ads Manager. Then assign unique pixel IDs for each store view.
![]()
Important: multiple store views can share the same Conversion API for server-side tracking. But you have to create Conversion Events for each store view and assign them to different data sources (Pixel IDs).
![]()