=== CodifyCore Server-Side Tracking for WooCommerce ===
Contributors: codifycore
Tags: woocommerce, server-side tracking, google tag manager, ga4, analytics
Requires at least: 5.6
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Server-side tracking for WooCommerce using sGTM and GA4 Measurement Protocol.

== Description ==

CodifyCore Server-Side Tracking for WooCommerce connects WooCommerce product, cart, checkout, and order activity to Server-Side Google Tag Manager and Google Analytics 4 Measurement Protocol.

= Key features =

* Server-side WooCommerce ecommerce event tracking.
* sGTM routing through GA4 Measurement Protocol.
* PageView, ViewContent, Search, AddToCart, InitiateCheckout, and Purchase events.
* Optional browser-side Meta Pixel events using a Pixel ID.
* Shared browser/server event IDs for supported Meta deduplication.
* WooCommerce order, billing, product, cart, and checkout context mapping.
* SHA-256 hashing controls for selected customer matching fields.
* Privacy Policy Tool with generated disclosure text.
* Pro extension points for Direct Meta CAPI, diagnostics, logs, and licensed events.

== Requirements ==

WooCommerce must be installed and active. Without WooCommerce, the addon remains dormant and shows an admin notice.

== Installation ==

1. Upload the plugin folder to `/wp-content/plugins/`, or install the plugin ZIP from **Plugins > Add New > Upload Plugin**.
2. Activate **CodifyCore Server-Side Tracking for WooCommerce**.
3. Go to **CodifyCore > Server-Side Tracking for WooCommerce**.
4. Configure your sGTM endpoint, GA4 Measurement ID, and GA4 API secret.
5. Enable the events you want to track.

== External services ==

CodifyCore Server-Side Tracking for WooCommerce is an independent plugin and is not affiliated with, endorsed by, or sponsored by WooCommerce, Google, or Meta.

This plugin does not send tracking data until a site administrator enables and configures a tracking destination or enables the optional Meta Pixel feature. Site owners are responsible for obtaining any consent required for their configuration.

When server-side tracking is enabled, the plugin sends selected ecommerce events to the sGTM endpoint entered by the site administrator. Depending on the enabled event and available WooCommerce data, this can include event time and name, page URL, product and order details, value and currency, IP address, browser user agent, first-party attribution identifiers, and selected customer fields after SHA-256 hashing. The endpoint is chosen and controlled by the site owner; tags configured in that sGTM container may forward data to Google Analytics or other services.

Google privacy policy: https://policies.google.com/privacy
Google Analytics terms: https://marketingplatform.google.com/about/analytics/terms/us/

When Frontend Pixel is explicitly enabled in Install mode, the plugin loads Meta's `fbevents.js` from `connect.facebook.net` and sends the selected browser events to Meta using the configured Pixel ID. Those events can include event name and ID, page URL, product details, order value, currency, and identifiers available to Meta Pixel.

Meta privacy policy: https://www.facebook.com/privacy/policy/
Meta terms: https://www.facebook.com/legal/terms
== Frequently Asked Questions ==

= Which Purchase triggers are supported? =

Purchase dispatch runs once when WooCommerce reports payment complete or when the order enters WooCommerce's paid-status list. A transient and order meta flag prevent duplicate Purchase dispatches.

= Does this support Checkout Blocks? =

Yes. Checkout context is captured through both classic checkout hooks and `woocommerce_store_api_checkout_order_processed`.

= Does the plugin hash customer data? =

Yes. Enabled matching fields are normalized and SHA-256 hashed before being sent in supported payloads.

= Where are docs and changelog? =

Documentation: https://codifycore.com/docs/codifycore-server-side-tracking-for-woocommerce/

Changelog: https://codifycore.com/docs/codifycore-server-side-tracking-for-woocommerce/changelog/

== Screenshots ==

1. General settings with master enablement, environment mode, system status, and support links.
2. Server-side Google Tag Manager integration settings and the pre-configured container download.
3. Optional frontend Meta Pixel settings with loading mode and duplicate-pixel guidance.
4. Event selection, value calculation, and privacy-aware customer data hashing controls.
5. Privacy Policy Tool with copy-ready privacy, cookie, and data-sharing disclosures.

== Changelog ==

= 1.0.0 =
* Initial WooCommerce release.
* Added WooCommerce-native product, cart, checkout, order, billing, and customer payload mapping.
* Added PageView, ViewContent, Search, AddToCart, InitiateCheckout, and Purchase tracking.
* Added optional browser Meta Pixel support and event ID sharing.
* Added Privacy Policy Tool and Pro extension points.

== Upgrade Notice ==

= 1.0.0 =
Initial WooCommerce release.
