=== Spectry Tracking ===
Contributors: spectry
Tags: analytics, tracking, statistics
Requires at least: 5.0
Tested up to: 7.1
Requires PHP: 7.0
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Adds the Spectry analytics tracking snippet to the head of your site.

== Description ==

Spectry is a hosted analytics service. This plugin connects a WordPress site to
a Spectry account: enter the site ID and write key from your Spectry dashboard,
switch the Active toggle on, and the tracking snippet is added to the `<head>`
of every front-end page.

The plugin has no premium tier, no locked features and no upsells. Everything it
does is in the code.

Using it requires a Spectry account, because the snippet reports to the Spectry
service. See the External services section below for exactly what is loaded and
what is sent.

= Features =

* Site ID and write key settings under Settings > Spectry.
* An Active toggle that turns the snippet on and off without deactivating the plugin.
* Nothing is printed unless the toggle is on and both credentials are filled in.
* The snippet is never printed in the admin area.

== External services ==

This plugin connects to Spectry, an analytics service operated by Spectry, to
collect website analytics for the site owner. It is the entire purpose of the
plugin and it is only active when you enter your credentials and switch the
Active toggle on.

**What the plugin does**

When active, the plugin prints a small loader into the `<head>` of front-end
pages. That loader requests the tracking script from
`https://cdn.spectry.io/spectry.js?id=<your site ID>` and passes along your site
ID and write key as data attributes on the script tag. The request happens in
the visitor's browser on every front-end page view.

**What data is sent to Spectry**

The tracking script, running in the visitor's browser, sends page view and usage
data to Spectry. This includes the visitor's IP address (used by the service to
resolve approximate location), user agent, the URL of the page being viewed, the
referring URL, and interaction data generated as the visitor uses the page. No
data is sent from your server by this plugin, and the plugin itself stores
nothing about your visitors in your WordPress database.

**Terms and privacy**

* Terms of service: https://spectry.io/terms-of-service
* Privacy policy: https://spectry.io/privacy-policy

Because visitor data is sent to a third-party service, you are responsible for
disclosing this in your own privacy policy and for obtaining any consent
required in your jurisdiction (for example under the GDPR).

== Installation ==

1. Upload the plugin folder to `/wp-content/plugins/` (or install the zip via
   Plugins > Add New > Upload Plugin).
2. Activate the plugin.
3. Go to Settings > Spectry, fill in the site ID and write key from your Spectry
   dashboard, tick Active and press Save.

== Frequently Asked Questions ==

= Where is the snippet added? =

In `wp_head` at priority 1, so it loads as early as the theme allows.

= What happens if I leave a field empty? =

Nothing is printed. Both the site ID and the write key must be filled in and
Active must be on.

= Do I need a Spectry account? =

Yes. The snippet reports to the Spectry service, so the site ID and write key
have to come from a Spectry account.

= Does the plugin store any visitor data on my site? =

No. It stores only your site ID, write key and the Active toggle, in a single
WordPress option. That option is deleted when you delete the plugin.

== Changelog ==

= 1.0.0 =
* Initial release.
