=== twelvebit Analytics for WooCommerce ===
Contributors: twelvebit
Tags: analytics, woocommerce, revenue, attribution, privacy
Requires at least: 5.8
Tested up to: 6.8
Requires PHP: 7.4
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Privacy-friendly analytics with revenue attribution for WooCommerce stores.

== Description ==

The plugin connects your WooCommerce store to twelvebit:

* It adds the twelvebit script to every page, so pageviews and sources are counted.
* It sends the goals add_to_cart (AJAX, product page and block cart) and initiate_checkout.
* It saves the visitor and session ids on each new order.
* When an order is Processing or Completed, it sends the order to twelvebit. twelvebit credits the revenue to the visit that led to it.
* It sends refunds, so they subtract from the revenue.

Each order is signed with HMAC-SHA256 and a secret that only your twelvebit site knows. The requests are non-blocking, so checkout never waits for twelvebit.

== Installation ==

1. In twelvebit, open your site, then Revenue → Connect → WooCommerce. Click "Create secret".
2. In WordPress, open Plugins → Add New Plugin → Upload Plugin. Choose twelvebit-woocommerce.zip, click Install Now, then Activate.
3. Open Settings → twelvebit. Paste the Site ID, Domain, App URL and Webhook secret. Click Save Changes.
4. Remove any other twelvebit script from your theme, or visits count twice.
5. Place a test order and set it to Processing. The order shows in twelvebit under Revenue.

== Frequently Asked Questions ==

= Which data leaves my store? =

For each paid order: the order id and number, total, currency, billing email, customer id, product names, the twelvebit visitor and session ids, the date and the status. For each refund: the refund id, amount and date.

= Does it work with the block checkout? =

Yes. The plugin saves the ids for the classic checkout and for the Store API (block) checkout.

== Changelog ==

= 1.0.0 =
* First release.
