=== Acturity ===
Contributors: acturity
Tags: link shortener, qr code, woocommerce, conversion tracking, analytics
Requires at least: 5.8
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.0.3
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Create Acturity short links automatically when you publish content, track clicks in the
editor, and attribute form and WooCommerce order conversions back to the click that
caused them.

== Description ==

Acturity is a link intelligence platform: short links, QR codes, click analytics and
conversion tracking. This plugin connects your WordPress site to it with a single API key.

Once connected, it will:

* Create a short link automatically when you publish a post, page, or (with WooCommerce
  active) a product.
* Show the short link, its click count, and a campaign picker on the post/product edit
  screen.
* Add `[acturity_link]` and `[acturity_qr]` shortcodes.
* Add a "Clicks" column to your posts list.
* Send a "lead" conversion to Acturity when a Contact Form 7, WPForms, or Gravity Forms
  submission comes from a visitor who arrived through a tracked link.
* With WooCommerce active: attach the click id to the order at checkout, and send a
  "purchase" conversion once the order is paid. Orders paid online, or confirmed by hand
  (moved to Processing), count at once. Cash on delivery orders count when you mark them
  Completed. The sale amount is the items after discounts, without tax, shipping and fees. A sale above your plan's monthly sales allowance is not
  recorded today, and the order box says so.

== Installation ==

1. Download the plugin zip from https://www.acturity.com/downloads/acturity-wordpress.zip and
   upload it through Plugins, Add New, Upload Plugin, or upload the `acturity` folder to `/wp-content/plugins/`.
2. Activate the plugin.
3. Go to Settings → Acturity and paste your organisation's API key (found in Acturity under
   Settings → API keys). Create the key with write permission; a read-only key can show
   click counts but cannot create short links.
4. Choose a default domain, which post types should get automatic short links, and which
   conversion sources to enable.

== Frequently Asked Questions ==

= Does this require an Acturity account? =

Yes. Create a free account at https://acturity.com and generate an API key.

= Does the API key ever reach visitors' browsers? =

No. Every API call is made server-side. The QR code shortcode proxies the image through a
WordPress REST route rather than linking directly to the API.

= Does the plugin set cookies? =

Yes. When a visitor arrives through an Acturity link, the plugin saves the link's click code in a
cookie called actu_clid on your own site, for 30 days. That is how a later order or form is
credited to the click. If the visitor blocks or clears cookies before buying, the order is not
credited. It is not set when the visitor's browser sends Global Privacy Control. List the cookie
in your store's cookie notice.

== Changelog ==

= 1.0.3 =
* The click cookie is not set when the browser sends Global Privacy Control.

= 1.0.2 =
* Refunds and cancels lower the sale from plugin 1.0.2. A partial refund lowers the sale amount,
  a full refund or a cancel removes the sale. A partial refund of money only (no items) changes nothing.

= 1.0.1 =
* A WooCommerce sale is now sent only once the order is paid. A cash on delivery order no
  longer counts while it is Processing; it counts when you mark it Completed.
* The sale amount is now the items after discounts, without tax, shipping and fees. It was
  the full order total.
* If Acturity does not record a sale because the plan's monthly sales allowance is used up,
  the order is no longer marked as sent. The order box shows the reason and no retry is made.

= 1.0.0 =
* Initial release.
* Short links are created with QR codes enabled, so `[acturity_qr]` and the QR REST route
  work for every link the plugin creates.
* Short links are created the moment a post is published (5 second timeout). If the
  Acturity API cannot be reached, the plugin retries in the background up to three times,
  a minute apart, and shows the editor a notice.
* The QR REST route and `[acturity_qr]` shortcode only serve images for published content,
  and only accept sizes 128, 200, 300 or 400px (default 200) in png or svg format.
* The campaign list shown on the post/product edit screen is cached for 5 minutes, and is
  refreshed immediately whenever the API key is changed.
* If your plan doesn't include custom domains, the settings screen now says so and still
  reports the connection as working.
* The WooCommerce conversion pixel is now fetched once - when you save your API key or use
  "Test connection" - instead of on every checkout, so an order is never delayed waiting on
  it.
