=== PixelBridge Ads Tracking for OpenAI ===
Contributors: gijs1508
Tags: openai ads, chatgpt ads, conversion tracking, woocommerce, pixel
Requires at least: 5.8
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 0.1.9
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Install the OpenAI Ads Measurement Pixel, track WordPress conversions and debug your ChatGPT Ads measurement setup.

== Description ==

PixelBridge Ads Tracking for OpenAI helps WordPress site owners install the official OpenAI Ads Measurement Pixel, send supported conversion events, and verify that ChatGPT Ads measurement is actually working.

Official website: https://aiadspixel.com/

The plugin focuses on OpenAI Ads conversion tracking. It can load the official browser Pixel, optionally send the same conversions through the OpenAI Ads Conversions API, and keep a local event log for debugging.

PixelBridge Ads Tracking for OpenAI is an independent product and is not affiliated with, endorsed by, or sponsored by OpenAI. It is not an official OpenAI or ChatGPT product.

= Features =

* Official OpenAI Measurement Pixel installation
* Consent handling, including the WordPress Consent API
* page_viewed tracking once per page load after consent
* OpenAI Ads conversion tracking for standard web events
* Optional Conversions API with validate-only credential checks
* Browser and server-side measurement with shared event IDs where reliable
* WooCommerce conversion tracking
* Contact Form 7, Elementor Forms, and WPForms lead tracking
* URL conversion rules for thank-you pages
* Diagnostics for Pixel, CSP, consent, attribution, and duplicate implementations
* Local event log that does not store raw customer form data

= Supported Events =

* page_viewed
* contents_viewed
* items_added
* checkout_started
* order_created
* lead_created
* appointment_scheduled
* registration_completed
* subscription_created
* trial_started
* custom

= Integrations =

* WordPress page views and optional public registration
* WooCommerce product views, add to cart, checkout, and orders
* Contact Form 7
* Elementor Forms
* WPForms
* Cal.com embed bookings, when the documented success event is available
* URL rules for tools without a dedicated adapter

= Conversions API =

The Conversions API sends supported conversion events from your WordPress server. A key can be stored in settings or defined as `AIADSPIXEL_CAPI_KEY` in wp-config.php. The previous `AIAP_CAPI_KEY` constant is still accepted. The plugin can test credentials with `validate_only` so a production conversion is not recorded.

= Consent =

Consent is required before the official Pixel SDK is loaded and before conversion events are sent. Server-side events use the same decision. Supported modes:

* WordPress Consent API
* Manual JavaScript/PHP consent
* Unmanaged tracking after an explicit acknowledgement

= Privacy =

The plugin does not send telemetry to AIAdsPixel.com. Measurement requests go to OpenAI only when tracking is configured and consent allows it. The event log stores event names, statuses, and whether attribution identifiers were present — never the identifier values, emails, phone numbers, or API keys.

== External Services ==

This plugin can contact OpenAI Ads measurement services. It does not send tracking or conversion data to AIAdsPixel.com.

= OpenAI Ads Measurement Pixel SDK =

When browser measurement is enabled and the required consent is granted, the plugin may load the official OpenAI Ads Measurement Pixel SDK from:

https://bzrcdn.openai.com/

The SDK may then send website visit and configured conversion measurement information to OpenAI. The official Pixel is not loaded until consent is granted.

= OpenAI Ads Conversions API =

When the Conversions API is enabled and consent permits it, the plugin sends configured conversion event data to:

https://bzr.openai.com/

= Data that may be sent =

Depending on your configuration, OpenAI may receive:

* Pixel ID
* conversion event name
* event ID
* event timestamp
* source/page URL
* product identifiers
* quantities
* currency
* conversion value
* OpenAI attribution identifiers such as oppref and obref when available
* optional hashed matching information if you explicitly enable enhanced matching

PixelBridge / AI Ads Pixel does not send tracking or conversion data to AIAdsPixel.com.

= OpenAI policy links =

OpenAI Advertising Terms: https://openai.com/policies/advertising-terms/

OpenAI Ad Tools Terms: https://openai.com/policies/ad-tools-terms/

OpenAI Privacy Policy: https://openai.com/policies/privacy-policy/

= Other network requests =

Admin diagnostics may request this site’s own homepage to check whether the Pixel snippet is present. That request stays on your WordPress site and is not sent to a third-party analytics service.

== Installation ==

1. Upload the `pixelbridge-ads-tracking-for-openai` folder to `/wp-content/plugins/`.
2. Activate PixelBridge Ads Tracking for OpenAI through the Plugins screen.
3. Open **PixelBridge** in the WordPress admin menu.
4. Enter your OpenAI Ads Pixel ID.

== Getting Started ==

1. Create a Pixel ID in the conversions tab of OpenAI Ads Manager.
2. Paste it into PixelBridge → Settings.
3. Choose a consent setup that matches your site.
4. Optionally enable the Conversions API and use Test connection.
5. Enable detected integrations such as WooCommerce or Contact Form 7.
6. Open Diagnostics to verify the official SDK is present after consent.

== Frequently Asked Questions ==

= What is PixelBridge Ads Tracking for OpenAI? =

It is a WordPress plugin that installs the official OpenAI Ads Measurement Pixel, maps WordPress conversions to supported events, and helps you verify the setup. It is also known as AI Ads Pixel.

= Does this plugin work with ChatGPT Ads? =

ChatGPT Ads use OpenAI Ads measurement. This plugin implements that measurement layer for WordPress. It is not an official ChatGPT product.

= Do I need a Conversions API key? =

No. The browser Pixel can run on its own. A Conversions API key is optional and recommended for more resilient measurement.

= Does the plugin support WooCommerce? =

Yes. It can track contents_viewed, items_added, checkout_started, and order_created. Order events use a shared ID for browser and server deduplication.

= Does it support Contact Form 7? =

Yes. A successful mail send can create a lead_created event. Validation errors and spam rejections are not tracked.

= Does it support Elementor Forms? =

Yes, Elementor Pro form submissions that produce a new record can create lead_created events.

= How does cookie consent work? =

The plugin can follow the WordPress Consent API, expose a manual JavaScript API, or run without plugin-managed consent after you acknowledge that you remain responsible for legal consent. The official Pixel SDK and conversion events wait for that consent.

= What is oppref? =

oppref is an OpenAI-provided attribution identifier that may appear on a landing-page URL. The official Pixel captures it. This plugin does not remove or rewrite it.

= What is obref? =

__obref is a first-party cookie the Pixel may set for hybrid browser/server matching. When Conversions API and consent allow it, the plugin forwards the value unchanged and never logs it.

= Does PixelBridge send my data to AIAdsPixel.com? =

No. There is no telemetry to AIAdsPixel.com. Tracking and conversion data go to OpenAI only.

= Is this plugin made by OpenAI? =

No. PixelBridge Ads Tracking for OpenAI is an independent product and is not affiliated with, endorsed by, or sponsored by OpenAI.

== Screenshots ==

1. Overview status cards for Pixel, Conversions API, consent, and integrations.
2. Settings for Pixel ID, consent, and the Conversions API.
3. Diagnostics for Pixel, CSP, attribution, and duplicate tracking.

== Changelog ==

= 0.1.9 =
* Switch the text domain and plugin folder to `pixelbridge-ads-tracking-for-openai` to match the WordPress.org slug.

= 0.1.8 =
* Allow activation when WordPress loads the plugin file more than once. The previous guard used wp_die and was reported as a fatal error.

= 0.1.7 =
* Prevent a fatal error when the previous `ai-ads-pixel` folder is still active beside this version.

= 0.1.6 =
* Ship the plugin folder as `pixelbridge-ads-tracking-for-openai` so it matches the WordPress.org slug and text domain.
* Escape the legacy event-log table rename during prefix migration.

= 0.1.5 =
* Align the text domain with the WordPress.org plugin slug `pixelbridge-ads-tracking-for-openai`.

= 0.1.4 =
* WordPress.org compliance revision: distinctive `aiadspixel_` prefix, display name update, and external-service disclosure.
* Safe migration from previous `aiap_` option, cron, and event-log names.
* Consent now fails closed when the WordPress Consent API is selected but unavailable.
* Official Pixel SDK loads only after consent is granted.

= 0.1.3 =
* Review-prep release with consent, diagnostics, and Conversions API validation work.

= 0.1.0 =
* Initial public testing release.
* Official OpenAI Measurement Pixel loader.
* Consent, page_viewed, Conversions API, diagnostics, form and WooCommerce integrations.

== Upgrade Notice ==

= 0.1.9 =
Install as `pixelbridge-ads-tracking-for-openai`. Delete older `ai-ads-pixel` and `ai-ads-pixel-openai-ads-conversion-tracking` folders first.

= 0.1.8 =
Delete every older PixelBridge / ai-ads-pixel copy first, then install this single folder.

= 0.1.7 =
Deactivate and delete the old `ai-ads-pixel` plugin folder before activating this version.

= 0.1.6 =
Install this version as `pixelbridge-ads-tracking-for-openai`. Remove the old `ai-ads-pixel` plugin folder first if it is still present.

= 0.1.5 =
Text domain now matches the WordPress.org plugin slug. No settings migration is required.

= 0.1.4 =
Updates stored option, cron, and event-log names from `aiap_` to `aiadspixel_`. Existing settings are migrated automatically. Confirm consent mode after updating.
