# Privacy

SleekTrack is designed so that invasive data is never collected in the first
place. This page explains exactly what is stored and what is not.

## What is stored

For every event:

- The page URL and path, and the page title of pageviews (unless **Page
  titles** is turned off)
- The referrer and the source it maps to, and UTM parameters
- The country code and continent, plus the region and city when an edge
  header or the city database supplies them
- The device type, and the browser and operating system names with their
  version numbers
- An anonymous visitor hash and an anonymous session hash
- The event type and name, and any properties the site sends with a custom
  event
- How far the visitor scrolled, as a separate engagement event (unless
  **Scroll depth** is turned off)
- A UTC timestamp

Event properties are stored as JSON, up to 2048 bytes per event; a larger
properties object is dropped and the event is stored without it. Properties
hold whatever the site's own code sends, so a site that passes names, email
addresses or other personal data in `sleekTrack()` properties stores that
data too. Keep personal data out of properties.

When WooCommerce or Easy Digital Downloads completes an order on the install
that tracks itself, a Purchase event also stores the order total, its
currency, the order ID and the store plugin (`woocommerce` or `edd`). Until
the order completes, the order itself keeps the visitor's anonymous visitor
and session IDs in the `_sleektrack_identity` meta field, and
`_sleektrack_recorded` marks an order whose revenue was recorded.

## Heatmaps

A site's **Heatmaps** setting is off until you turn it on. While it is on,
the tracker sends up to 20 clicks per pageview, and each one stores only:

- The page path and the day, in UTC
- The clicked element's position in the page's structure, such as
  `#main > div:nth-of-type(2) > a:nth-of-type(1)`, never its text or a form
  value
- Where inside the element the click landed, rounded to a 20 by 20 grid
- The viewport size: desktop (1024 pixels wide or more), tablet (600 or
  more) or mobile

Clicks that land on the same spot add to one count. No visitor or session
hash, location, referrer or time of day goes with them, so a click cannot be
traced to a visit. The counts are removed with the site, and by the same
retention as events.

## What is never stored

- IP addresses
- Raw user agents
- Cookies or identifiers in the visitor's browser

SleekTrack never asks for names, emails or other personal identifiers. The
only way they reach the database is through event properties your own code
sends.

## How visitors are counted

The visitor hash is computed from the IP address and user agent together with
a random salt:

- A new salt is generated for every UTC day, and the daily background task
  deletes every salt older than the previous day
- The same visitor is recognised within a UTC day, so daily visitor counts
  are accurate
- Once a day's salt is deleted, that day's hashes can no longer be reproduced
  from an IP address and user agent, so visitors cannot be linked across days

There is one salt per day for each WordPress install (on a network, for each
enabled site), not one per tracked domain. A visitor who reaches two domains
tracked by the same install on the same day gets the same visitor hash on
both.

Sessions use the same anonymous identity with a 30-minute sliding inactivity
window, so a visit ends after 30 minutes without activity.

## Signals that are respected

- Browsers sending the **Do Not Track** header are dropped by the collector
  before any processing
- Known bots, crawlers and script traffic are filtered out
- A purchase is recorded by the server when the order completes, not by the
  tracker. When the shopper's browser sent Do Not Track or looked like a bot,
  the purchase is recorded without being linked to their visit; a shopper
  with an excluded role or IP address is not recorded at all

## Location

Country detection uses trusted Cloudflare, CloudFront, Vercel,
`X-Country-Code`, GeoIP or configured headers. Cloudflare, CloudFront and
Vercel headers can also supply the region and city.

With **City-level geolocation** on, SleekTrack downloads the free DB-IP City
Lite database from `download.db-ip.com` and refreshes it once a month through
its daily background task. While the setting is on, the collector looks up
each visitor's IP address in that local file to resolve the region and city,
and the country when no header supplied one. The lookup happens on your
server: no visitor data is sent to DB-IP or anyone else, and only the resolved
location is stored.

The database is a single file,
`wp-content/uploads/sleek-track/dbip-city-lite.mmdb`, shared by every site on
the install. Turning the setting off stops the lookups at once, and the daily
task deletes the file when no site of the network still uses it.
[Uninstalling SleekTrack](/docs/track/activating.md#uninstalling) removes it too.

DB-IP publishes City Lite under the Creative Commons Attribution 4.0
International licence, which asks for attribution to DB-IP.com with a link to
`https://db-ip.com` on pages that display or use its results. The Locations
card carries that credit, **IP geolocation by DB-IP**.

## Where the data lives

All analytics data is stored in your own WordPress database. It leaves your
server only where you send it:

- A goal webhook posts each new goal completion (the event's ID, the site's
  domain, the goal name, the event type, the path and the time) to the URL you
  enter
- A share link shows a dashboard to anyone who has the link
- The Track assistant sends the questions you ask, and the numbers it reads to
  answer them, to the AI provider whose key you entered, and so does the
  dashboard's **Summary (.md)** download to write its recommendations
- [Email reports and spike alerts](/docs/track/email.md) send totals, top
  sources and top pages, or a site's current visitor count, to the addresses
  you enter; no individual visit is part of them

The dashboards and shared pages load the icons of referring domains and
tracked sites from DuckDuckGo's icon service in the viewer's browser; no
visitor data is part of those requests.

Deleting a site removes all of its events and daily totals.
[Uninstalling SleekTrack](/docs/track/activating.md#uninstalling) deletes all of
the data, the city database and both order meta fields included.
