
GlobalDev SignalBridge for OpenAI Ads
v1.3.0Globaldev · 2026年9月23日 上架
Add the OpenAI Ads Measurement Pixel and optional Conversions API server-side tracking to WordPress, with automatic WooCommerce support.
- 正在使用
- 10 以下
- 评分
- 暂无
- 累计下载
- 544
- 最近更新
- 2026年11月12日
贡献者
截图
GlobalDev SignalBridge for OpenAI Ads adds the OpenAI Ads Measurement Pixel to WordPress and provides configurable tracking for WordPress content, WooCommerce commerce actions, common form submissions, registrations, subscription events, URL-based success events, and custom events. For WooCommerce purchases it can also send paid order_created events through the OpenAI Conversions API from the server.
The plugin accepts the complete OpenAI base pixel snippet from Ads Manager. For security, it does not store or execute arbitrary pasted JavaScript. It extracts the pixelId and debug setting, then generates the fixed official SDK loader itself.
Current standard events supported:
page_viewed– selectable public WordPress post types plus optional archive/search/taxonomy/404 routes.contents_viewed– WooCommerce single product pages.items_added– successful WooCommerce AJAX/Blocks add-to-cart actions plus non-AJAX fallback.checkout_started– WooCommerce checkout page with cart value/currency/contents when available.order_created– paid WooCommerce order on a valid order-received URL, with order value/currency/contents, stable event ID, mandatory order-key validation, and a persistent one-time database guard.lead_created– successful Contact Form 7, Elementor Pro Form, and WPForms AJAX submissions, plus optional success URL rules.registration_completed– frontend WordPress/WooCommerce registrations plus optional success URL rules.appointment_scheduled– configurable success URL rules or JavaScript API.trial_started– configurable success URL rules, JavaScript API, and automatic WooCommerce Subscriptions trial detection when available.subscription_created– configurable success URL rules, JavaScript API, and automatic WooCommerce Subscriptions parent-order detection when available.custom– configurable custom event name and URL rule, plus JavaScript API.
The plugin maps each standard event to the OpenAI data type documented by the official OpenAI Ads Measurement Pixel GTM template:
contents: page_viewed, contents_viewed, items_added, checkout_started, order_created.customer_action: lead_created, registration_completed, appointment_scheduled.plan_enrollment: trial_started, subscription_created.custom: custom event.
The browser also exposes window.gdOpenAIAdsTrack() for integrations that need to fire a standard event at a business-specific success point.
Click triggers measure an event when a visitor clicks a button, link or any other element. On the settings page each rule pairs a CSS selector with an event (lead_created, appointment_scheduled, registration_completed, contents_viewed, items_added, checkout_started, trial_started, subscription_created or a custom event) and can be sent on every click, once per page view or once per browser session. The same can be done without a rule by adding the attribute data-gd-oai-event to an element, or from code with window.gdOpenAIAdsOnClick(). Click triggers cannot send page_viewed or order_created.
Optional server-side tracking uses the OpenAI Conversions API. When enabled, the plugin sends paid WooCommerce order_created events to https://bzr.openai.com/v1/events using the same wc_order_{ID} identifier as the browser Pixel so OpenAI can deduplicate browser and server delivery. The Conversions API key is stored only in WordPress options and is never exposed to frontend JavaScript. Successful server delivery is recorded in WooCommerce order metadata and failed deliveries are retried a limited number of times.
Since 1.3.0 the Conversions API can also deliver the other measured events, not only purchases: contents_viewed, items_added, checkout_started, lead_created, registration_completed, appointment_scheduled, trial_started, subscription_created, custom events and, optionally, page_viewed. When the browser Pixel measures one of the selected events, the visitor’s browser posts the same event to your own site, and WordPress forwards it to OpenAI with the same event ID so the browser and server copies are deduplicated. Because the request comes from the visitor’s browser, this also works on fully cached pages. order_created is never accepted from the browser; it is sent only from verified, paid WooCommerce orders. The settings page shows the last successful server delivery, the last error, and a connection test that validates the saved Pixel ID and key without recording a conversion.
WooCommerce attribution diagnostics can record an OpenAI Ads click when the official oppref signal is present and can record a direct ChatGPT referral when a browser referrer is available. These local records are stored on WooCommerce orders and are diagnostic only; OpenAI Ads Manager determines final ad attribution.
An optional enhanced matching setting can add supported customer matching fields to Pixel initialization when they are available. Email, phone, first name, last name and external customer ID are normalized and SHA-256 hashed server-side. Supported location fields are passed in the format accepted by the OpenAI Pixel. This setting is disabled by default and should be enabled only when the site owner’s privacy and consent configuration permits it.
When enhanced matching is enabled, three coverage options (all on by default, each can be switched off) raise the share of events that carry user data:
- External ID for every visitor – registered customers keep their hashed account ID; all other visitors get a random, pseudonymous first-party ID (cookie
gd_oai_vid, 12 months) that is SHA-256 hashed and sent as the external ID. Guest orders carry the same ID in their server-side event. - Remember hashed identifiers – after a visitor is identified once (login, checkout, order or form), the SHA-256 hashes are kept in the browser’s local storage and reused on later page views, including cached pages and logged-out visits. Only hashes are stored.
- Checkout and lead-form email – the email typed into the WooCommerce checkout, or submitted through a tracked Contact Form 7, Elementor Pro or WPForms form, is hashed in the browser and added to the Pixel before the conversion is measured.
Developers can add customer information with window.gdOpenAIAdsIdentify() and connect a consent manager with window.gdOpenAIAdsConsent().
This community plugin is developed by GlobalDev and is not affiliated with or endorsed by OpenAI. OpenAI and ChatGPT are trademarks of their respective owner.
External services
This plugin connects to OpenAI Ads measurement services when configured.
The browser loads the official JavaScript SDK from:
https://bzrcdn.openai.com/sdk/oaiq.min.js
Measurement events are transmitted by the OpenAI SDK according to the configured Pixel ID and enabled events. When Conversions API / server-side tracking is enabled, paid WooCommerce order_created events and the events selected under “Additional server-side events” are also sent from the WordPress server to:
https://bzr.openai.com/v1/events
The additional events first travel from the visitor’s browser to this WordPress site (wp-admin/admin-ajax.php, same origin) and are forwarded from the server. No third party other than OpenAI receives them.
Server requests use the saved Conversions API key in an Authorization header and the configured Pixel ID as the pid query parameter. This external service is required for OpenAI Ads tracking functionality.
OpenAI terms and privacy information:
https://openai.com/policies/terms-of-use/
https://openai.com/policies/privacy-policy/
Site owners are responsible for appropriate privacy disclosures and for obtaining any consent required by applicable law before enabling measurement technologies.
Privacy
The plugin stores its WordPress configuration, including Pixel ID, debug preference, event toggles, post-type selections, URL trigger rules, click trigger rules, product identifier preference, attribution setting, enhanced-matching setting, Conversions API enablement, and the Conversions API key when supplied.
When local attribution is enabled and a qualifying OpenAI Ads or ChatGPT source signal is detected, the plugin may set a signed first-party attribution cookie for up to 30 days and save source metadata on the resulting WooCommerce order. The OpenAI oppref value, when available, is stored with the order for diagnostics.
When enhanced matching is enabled, supported customer identifiers are normalized and hashed before being added to OpenAI measurement payloads. Supported location values may be sent in the documented format. For Conversions API purchase events, the OpenAI browser reference (__obref), customer IP address, and user agent may also be sent when available.
When the “External ID for every visitor” option is enabled, the plugin sets the first-party cookie gd_oai_vid (random identifier, 12 months) and, when Conversions API is enabled, stores that identifier on the WooCommerce order created by the visitor. Only its SHA-256 hash is sent to OpenAI. When “Remember hashed identifiers” is enabled, the hashed user object is stored in the browser’s local storage under gd_oai_user. A consent denial set through gdOpenAIAdsConsent(false) is stored in local storage under gd_oai_consent and removes both identifiers.
For events relayed through the Conversions API with enhanced matching enabled, the visitor’s hashed identifiers, the OpenAI browser reference (__obref), IP address and user agent are sent to OpenAI. The OpenAI click identifier (oppref) is sent when present. The plugin stores the time and result of the last server delivery and connection test in the gd_oai_ads_capi_status option.
A click trigger set to “once per browser session” stores a marker in the browser’s session storage (gd_oai_click_*), as the existing once-per-session events do (gd_oai_once_*).
Frontend measurement data is sent through the OpenAI Ads Measurement Pixel when configured. Review OpenAI documentation and your applicable privacy/consent obligations before deployment.

