ChatGPT Ads module for PrestaShop: conversions, add to cart and CAPI
I have built a complete PrestaShop module to track ChatGPT Ads conversions: it loads the OpenAI pixel after consent, sends orders through the Conversions API when PrestaShop confirms them, deduplicates both channels and keeps the oppref click identifier from the first visit all the way to the purchase. I install and configure it on your shop myself.
Install ChatGPT Ads tracking on my PrestaShop shop
Why PrestaShop shops ask me for this module
- ChatGPT Ads campaigns running since the French launch, with no sale attributed in Ads Manager
- A conversion-optimised campaign that cannot be created because no conversion event is active
- No marketplace module covers pixel, Conversions API, oppref and consent together on your PrestaShop version
- A pixel pasted by hand into the theme template, loading before the cookie banner
- Redirect payments (card, PayPal, bank transfer) after which the customer never returns to the confirmation page
What the module does, event by event
The module maps the PrestaShop purchase journey to the standard events defined by OpenAI:
- contents_viewed on the product page, with the ID, name and price of the displayed combination;
- items_added on add to cart, including AJAX adds from a product list or the theme’s modal window;
- checkout_started when entering the checkout;
- order_created on purchase, sent both by the pixel on the confirmation page and by the server;
- registration_completed on customer account creation, and lead_created on the contact form if you want it.
The purchase event matters most: it is the one you will choose as the goal of a conversion-optimised campaign. It leaves the server as soon as PrestaShop confirms the order, through the actionValidateOrder hook, whether or not the customer comes back from the payment page. For deferred payment methods such as bank transfer or cheque, we decide together which order status counts.
oppref, deduplication and the data sent
When a visitor arrives from an ad, the URL carries an oppref parameter. The pixel stores it in the __oppref cookie, but the Conversions API does not read it by itself. So the module captures it on arrival, links it to the PrestaShop cart and then to the order, and attaches it to the server call along with the obref browser identifier. A customer who comes back three days later to complete their cart stays linked to their click.
For deduplication, the module generates an opaque identifier when the order is created and uses it on both sides: event_id in the pixel, id in the Conversions API, with the same Pixel ID and the same event name. OpenAI then keeps a single sale. The amount is sent as an integer in the minor unit of the order currency, as the documentation requires.
Customer emails and phone numbers never leave the shop in clear text: they are normalised and then hashed with SHA-256 before sending. The Conversions API key stays on the server, in the module configuration, never in the theme JavaScript.
Already running a campaign?
Consent, GDPR and banner tools
Nothing is loaded or sent before the visitor consents: no script, no __oppref or __obref cookie, no server call. The module is compatible with tarteaucitron.js, where the pixel is declared as a custom service, and with Axeptio, Cookiebot, Didomi, CookieYes or Complianz, where it is tied to the marketing purpose. It can also read the ad storage signal from Google Consent Mode when the banner publishes it.
The consent state is stored with the order: a customer who refused will not be sent through the Conversions API. I give you the exact list of data sent, for your privacy policy and your record of processing; choosing the legal basis remains yours or your DPO’s.
How the installation on your shop works
-
Initial discussion
PrestaShop version, theme, existing tracking modules, consent tool, payment methods: I spot anything that could duplicate or block an event.
-
OpenAI data source
I guide you through the conversions tab in Ads Manager to create the Pixel ID and the Conversions API key, or I do it with access you grant me.
-
Installation on a copy
When a staging site exists, the module goes there first, with server calls in validation mode: nothing is saved at OpenAI during testing.
-
Consent wiring
The service is declared in your banner, then I check with cookies cleared that no call leaves before acceptance.
-
End-to-end test order
Product page, add to cart, checkout, payment: I check in the module log and in the recent events of Ads Manager that each step arrives, exactly once.
-
Going live
Validation mode switched off, the first real sales checked, then a short note on what is sent and where to check it.
PrestaShop compatibility
The module is designed for PrestaShop 1.7, 8 and 9. It relies on standard hooks rather than core overrides: it changes neither PrestaShop classes nor theme files, and uninstalls cleanly. In multistore, each shop can have its own Pixel ID and key; with multiple currencies, each order is sent in its own currency. A log available from the back office records server calls and OpenAI’s responses, so a gap can be checked without opening server files.
A heavily customised theme or a third-party one-page checkout may need an adjustment: that is precisely why I do the installation myself rather than leaving you a file to upload. For the overall logic of ChatGPT Ads tracking, read the complete guide to the OpenAI pixel, the Conversions API and consent.
Request the module or an installation
-
Install ChatGPT Ads tracking on my shop
The contact form is enough: platform, version, consent tool. I will get back to you with the steps.
-
The ChatGPT Ads conversion tracking guide
Pixel, Conversions API, oppref, deduplication and consent explained in detail.
-
Meta pixel and Conversions API on PrestaShop
The same pixel-plus-server logic, applied to Meta.
-
On WooCommerce?
The ChatGPT Ads extension for WordPress and WooCommerce.
- 2019 e-commerce developer since
- 1.6 → 9 PrestaShop versions covered
- 3 working languages: FR, EN, TR
- 100 % direct contact with the developer
No middleman: the person who replies is the one who works on the code.
Describe your need in one minute
A few targeted questions so I can reply with an estimate rather than another questionnaire.