=== EventsGateway Tracker ===
Contributors: eventsgateway
Tags: analytics, tracking, ecommerce, woocommerce, attribution
Requires at least: 6.0
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Adds EventsGateway tracking to WordPress and automatically enables WooCommerce ecommerce events when WooCommerce is active.

== Description ==

EventsGateway Tracker connects a WordPress site to the EventsGateway collector. Site owners can enable or disable the tracker from Settings > EventsGateway, set the EventsGateway loader URL, Site ID, Public API Key, and click tracking preference.

When enabled, the plugin sends PageView events on public WordPress pages.

If WooCommerce is active, the same plugin automatically shows ecommerce settings for:

* Product views and product category views.
* Cart views.
* Add to cart actions.
* Checkout starts.
* Purchases on the WooCommerce order received page.

The plugin does not print tracking code until it is enabled and a Site ID or Public API Key is saved. WooCommerce tracking settings are only shown when WooCommerce is detected.

= External service disclosure =

This plugin connects to EventsGateway, a service operated at https://eventsgateway.com/. When enabled, the public site loads the configured EventsGateway browser loader and sends browser event data to the configured EventsGateway collector.

The default loader URL is `https://e.eventsgateway.com/e/`. Site owners can change this URL in plugin settings.

Data can include page URL, page title, referrer, browser metadata, session identifiers, consent state, configured lead events, and click events when enabled.

When WooCommerce is active and ecommerce tracking is enabled, events may also include WooCommerce product IDs, SKUs, names, categories, quantities, prices, cart value, order ID, order value, and currency. If the site owner enables customer data on purchase events, purchase events may also include billing email, phone, first name, last name, city, state, country, and postcode.

Review the EventsGateway terms and privacy policy before enabling the plugin:

* Terms: https://eventsgateway.com/terms/
* Privacy: https://eventsgateway.com/privacy/

== Installation ==

1. Upload the `eventsgateway` folder to `/wp-content/plugins/` or upload `eventsgateway.zip` through Plugins > Add New > Upload Plugin.
2. Activate EventsGateway Tracker from the Plugins screen.
3. Open Settings > EventsGateway.
4. Enable tracking and enter the EventsGateway loader URL plus a Site ID or Public API Key.
5. If WooCommerce is active, review the WooCommerce ecommerce event settings shown on the same settings page.
6. Save settings and verify events in EventsGateway.

== Frequently Asked Questions ==

= Does the plugin track immediately after activation? =

No. The tracker is only printed after it is enabled and a Site ID or Public API Key is configured.

= Do I need a separate WooCommerce plugin? =

No. EventsGateway Tracker detects WooCommerce automatically. When WooCommerce is active, ecommerce settings appear on the same Settings > EventsGateway page.

= Does this plugin create database tables? =

No. It stores configuration in the WordPress options table and does not create custom tables.

= Can click tracking be disabled? =

Yes. Disable click tracking from Settings > EventsGateway.

= Can WooCommerce purchase events include customer data? =

Yes, but only when the site owner enables the customer data option. It is disabled by default.

== Changelog ==

= 1.0.0 =
* Initial EventsGateway Tracker release with automatic WooCommerce ecommerce tracking when WooCommerce is active.
