=== ServerTrack - Conversion API & Pixel ===
Contributors: onecodesoft
Tags: facebook, pixel, woocommerce, tracking, analytics
Requires at least: 5.2
Tested up to: 6.9
Requires PHP: 7.4
Stable tag: 1.1.0
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Donate link: https://servertrack.io

Plug & Play Server-Side Tracking for WooCommerce. Auto-generates DataLayer events & connects Facebook CAPI instantly. No GTM required.

== Description ==

ServerTrack is a powerful Server-Side Tracking solution designed to fix signal loss caused by iOS14, Ad Blockers, and ITP (Intelligent Tracking Prevention). By moving your tracking from the browser to the server, you ensure 99% data accuracy and improve your ROAS.

**Why use this plugin?**
Most tracking solutions require complex setups involving Google Tag Manager (GTM), DataLayer plugins, and expensive monthly subscriptions. 

**ServerTrack is different.** This plugin handles everything:
1.  **Generates the DataLayer:** It automatically detects WooCommerce events (ViewContent, AddToCart, Checkout, Purchase) and creates the necessary data code. You do NOT need "GTM4WP" or any other plugin.
2.  **Connects to CAPI:** It loads the ServerTrack SDK to send events directly to your server and Facebook Conversion API.
3.  **Handles Deduplication:** Automatically manages Event IDs to ensure Facebook doesn't double-count events from your Browser Pixel and Server.

**Key Features:**
* **Zero-Code Setup:** Just paste your Auth Key and select "Full Plug-and-Play".
* **Custom Domain Support:** Use your own subdomain (e.g., `track.yourstore.com`) to set first-party cookies and bypass ad blockers completely.
* **Automatic WooCommerce Tracking:** Tracks Product Views, Cart Additions, Checkouts, and Purchases out of the box.
* **Advanced Matching:** Automatically captures and hashes customer data (Email, Phone, Name, City) from WooCommerce orders to improve Facebook Match Quality scores.
* **Pixel Interceptor:** If you prefer using your existing Pixel plugin, ServerTrack can "listen" to it and send server-side events in the background.

== Installation ==

1.  Upload the `servertrack-pixel` folder to the `/wp-content/plugins/` directory.
2.  Activate the plugin through the 'Plugins' menu in WordPress.
3.  Go to **Settings > ServerTrack**.
4.  Enter your **Authentication Key** (Found in your ServerTrack Dashboard).
5.  Select **"Full Plug-and-Play (Recommended)"** as the tracking mode.
6.  (Optional) Enter your **Server Domain** if you are using a custom subdomain (e.g., `track.mystore.com`).
7.  Click **Save Changes**.

== Frequently Asked Questions ==

= Do I need Google Tag Manager (GTM)? =
No. This plugin includes a built-in "DataLayer Generator" specifically for WooCommerce. It creates the tracking data automatically.

= Can I use my own Custom Domain? =
Yes! In the settings, you can replace the default `app.servertrack.io` with your own custom domain (e.g., `track.yoursite.com`). This turns ServerTrack into a "First-Party" tracker, which is much harder for browsers to block.

= Where do I find my Auth Key? =
Log in to your ServerTrack Dashboard, go to the "Server Deck" tab, Click on Edit Configuration and copy the Authentication Key for your specific server instance.

= What if I already have a Facebook Pixel plugin installed? =
You have two options:
1.  **Recommended:** Disable your old pixel plugin and let ServerTrack handle everything (Browser + Server) to ensure perfectly clean data.
2.  **Alternative:** Keep your old plugin, but change ServerTrack's setting to **"Pixel Interceptor"** mode. ServerTrack will then listen to your existing pixel's events and forward them to CAPI.

== Screenshots ==

1.  **Settings Page:** Simple configuration—enter your Auth Key, choose your mode, and set your Custom Domain.
2.  **Debugger Tools:** Use our debugger tools in realtime to verify and debug your events data.
3.  **Successful Event:** Example of all the events are going to facebook automatically in realtime.
== Upgrade Notice ==

= 1.1.0 =
Major Update: Added Custom Domain support and built-in DataLayer generator for WooCommerce.

== Changelog ==

= 1.1.0 =
* **New:** Added Custom Domain / Subdomain support field.
* **New:** Added built-in WooCommerce DataLayer generator.
* **New:** Added "Full Plug-and-Play" mode.
* **Improvement:** Enhanced "Purchase" event to include full customer details for Advanced Matching.

= 1.0.0 =
* Initial release.