Tracker and cookie monitoring

Two tools share one scanner (go/internal/sitescan): a one-off CLI check and scheduled monitors.

Embed
Preview of the card
<a href="https://lucidace.com/help/tracker-monitoring"><img src="https://lucidace.com/help/_api/public/orgs/af34862a-c837-4478-8335-0505efe40459/spaces/2f4b888b-c4e6-488b-81bd-6e838fb12d2e/pages/ad0fa769-abe7-46ab-b379-7d354cf28a3f/social-card.svg?v=3e7ae33eec8b" alt="Tracker and cookie monitoring" width="600" height="315"></a>

Two tools share one scanner (go/internal/sitescan): a one-off CLI check and scheduled monitors.

What a scan finds

For each page: third-party <script>, <iframe>, <img> (pixels) and preconnect/preload hosts, inline tracker snippets (fbq(, gtag(, _hsq, ...) and every cookie the page's responses set (Set-Cookie: name, domain, expiry, Secure/HttpOnly/SameSite). Hosts and cookie names are matched against a built-in catalog of about 40 vendors (GET /v1/projects/{pid}/tracker-catalog); any other third-party script, iframe or image host is reported as host:<name> with category other. The scan fetches HTML only; cookies a script writes later from JavaScript are attributed through that vendor's script, not listed one by one.

CLI

lucida doctor --site https://shop.example --cookies                       # inventory
lucida doctor --site https://shop.example --cookies --json > trackers.json  # save a baseline
lucida doctor --site https://shop.example --cookies --baseline trackers.json --pages https://shop.example/pricing

With --baseline the diff is printed and the command exits 1 when a tracker or cookie is new.

Scheduled monitors (Data > Tracker monitoring)

A monitor lists 1-20 pages and an interval (1-720 hours). lc-connectors runs due monitors every LC_TRACKER_MONITOR_TICK (default 5m, 0 disables the scheduler) through the egress-guarded HTTP client. Each run stores the inventory and the diff against the previous successful run.

Every tracker has a decision in an append-only log (allow or block, with actor and note; the newest entry wins). A run alerts when a new tracker has no decision yet, or when a blocked tracker is still present. The alert is a POST of JSON {type: "tracker_monitor.alert", project_id, monitor_id, monitor, unreviewed, blocked, new_trackers, new_cookies, url} to the monitor's https alert_webhook; the web page shows the same state without a webhook.

Route (lc-connectors)

Notes

GET/POST /v1/projects/{pid}/tracker-monitors

list (cursor pagination), create (admin)

GET/PATCH/DELETE /v1/projects/{pid}/tracker-monitors/{id}

patch/delete need admin

POST /v1/projects/{pid}/tracker-monitors/{id}/run

scan now (admin)

GET /v1/projects/{pid}/tracker-monitors/{id}/runs

newest first

GET/POST /v1/projects/{pid}/tracker-decisions

log (?tracker=) plus current; append (admin)

GET /v1/projects/{pid}/tracker-catalog

built-in vendors

Updated