=== eSauti ===
Tags: marketing, automation
Contributors: hachther

Requires at least: 6.0
Tested up to: 6.9
Requires PHP: 8.0
Stable tag: 1.0.0
License: GPLv3
License URI: https://www.gnu.org/licenses/gpl-3.0.html

Integrate eSauti to WordPress via shortcodes, without editing theme files.

== Description ==
eSauti adds eSauti tracking (`mtc.js`) in your header or footer and provides an optional noscript pixel fallback. It also supports a consent-gated mode where tracking starts only after calling `window.esauti_start_tracking()`.

It can also forward selected Gravity Forms events to eSauti inbound events (`/v1/inbound/event`) using an HMAC SHA-256 signature generated from your Inbound Secret Key.

Shortcodes included:
- `[esauti type="form" id="1"]`
- `[esauti type="focus" id="1"]`
- `[esauti type="content" slot="homepage_hero"]Fallback[/esauti]`
- `[esauti type="video" gate-time="15" form-id="1" src="https://example.com/video.mp4"]`
- `[esauti type="tags" values="tag1,tag2,-oldTag"]`

== Installation ==
1. Upload the plugin folder to `/wp-content/plugins/esauti/` or install as a zip from the WordPress admin.
2. Activate **eSauti** from the Plugins screen.
3. Go to **Settings -> eSauti**.
4. Set your eSauti Base URL and save.
5. Click **Test Connection** to verify `mtc.js` is reachable.
6. (Optional) Enable **Forward Gravity Forms events to eSauti** and set your **Inbound Secret Key**.

== Frequently Asked Questions ==
= How do I enable consent-gated tracking? =
Set Consent Mode to "Consent-gated" in Settings. Then call this in your consent callback:
`window.esauti_start_tracking({ consent: true });`

= How do I verify tracking is active? =
- Open your site and check the page source for `mtc.js`.
- In consent mode, call `window.esauti_start_tracking()` in browser console and verify requests are sent.
- If enabled, verify a `mtracking.gif` request appears for noscript fallback scenarios.

= Which Gravity Forms events are forwarded? =
- Successful form submission (`gform_after_submission`)
- Validation failures (`gform_validation` when invalid)
- Spam detections (`gform_entry_is_spam` when flagged)

== Changelog ==
= 1.0.0 =
* Initial release with settings page, connection tester, tracking injector, consent gating, and shortcode suite.

