A Chrome extension that shows you exactly how a page is tracking, attributing and redirecting β with zero data leaving your browser.
Installation Β· Features Β· How it works Β· Demo Β· Privacy Β· Roadmap
Marketing attribution breaks silently. A fbclid gets stripped by a redirect, a _fbc cookie never gets set, a pixel fires three times, a UTM disappears after a consent banner reload β and nobody notices until the reports look wrong.
TrackLens puts a lens on the current tab and shows you the whole attribution picture in one popup: URL parameters, cookies, storage, the redirect chain, and every tracking request from the major ad platforms. It then flags the common failure patterns and gives you a health score.
No backend. No account. No API key. No telemetry. Everything runs inside Chrome.
TrackLens parses the active tab URL and highlights the identifiers that matter for attribution:
The background service worker watches outgoing requests and classifies hits to the major platforms:
| Vendor | Matched endpoints |
|---|---|
| Meta | facebook.com/tr |
google-analytics.com, googletagmanager.com, doubleclick.net |
|
| TikTok | analytics.tiktok.com |
| Microsoft / Bing | bat.bing.com |
| Clarity | clarity.ms |
| Snapchat | snapchat.com |
TrackLens cross-references params, cookies, navigation history and requests to surface the problems that actually break attribution:
- π΄
fbclidpresent in the URL but the_fbccookie was never set - π΄ Meta pixel is firing but the
_fbpcookie is missing - π A click ID or UTM was present earlier in the redirect chain but has been lost on the final page
- π The same tracking request appears to be firing multiple times (duplicate pixels)
Each issue costs 15 points off a 100-point Tracking Health score, so you can eyeball a page's status in a second.
Anything that looks like a secret β keys matching token, secret, password, authorization, api_key, session β is masked in both the UI and the export (abc***xyz). You can share a debug report without leaking credentials.
One click produces a timestamped tracklens-report-*.json containing the page snapshot, params, cookies, navigation chain, tracking requests, detected issues and score. Perfect for attaching to a bug ticket or sending to an agency.
flowchart LR
classDef page fill:#151d33,stroke:#365cff,color:#e8ecf7,stroke-width:2px
classDef ext fill:#111827,stroke:#7c5cff,color:#e8ecf7,stroke-width:2px
classDef store fill:#14251d,stroke:#22c55e,color:#e8ecf7,stroke-width:2px
classDef ui fill:#1e1b4b,stroke:#22d3ee,color:#e8ecf7,stroke-width:2px
subgraph Browser["π Chrome tab"]
P[Web page<br/>URL Β· cookies Β· storage]:::page
CS[content.js<br/>storage snapshot]:::ext
end
subgraph SW["βοΈ Service worker"]
BG[background.js]:::ext
NAV[webNavigation<br/>redirect chain]:::ext
REQ[webRequest<br/>tracker requests]:::ext
end
ST[(chrome.storage.session<br/>per-tab, wiped on close)]:::store
subgraph Popup["π Popup Β· React"]
UI[Overview Β· Params Β· Cookies<br/>Storage Β· Navigation Β· Requests Β· Issues]:::ui
AN[Issue engine + health score]:::ui
EX[JSON export]:::ui
end
P --> CS
P -. navigations .-> NAV
P -. pixel calls .-> REQ
NAV --> BG --> ST
REQ --> BG
CS -- message --> UI
ST --> UI
P -- chrome.cookies --> UI
UI --> AN --> EX
| Layer | File | Role |
|---|---|---|
| Content script | public/content.js |
Answers a TRACKLENS_SNAPSHOT message with the page URL, title, referrer, LocalStorage and SessionStorage |
| Service worker | public/background.js |
Records top-level navigations and matching tracker requests per tab into chrome.storage.session, capped at 40 nav events and 120 requests, cleaned up when the tab closes |
| Popup | src/main.tsx |
React UI that pulls everything together, runs the issue heuristics, computes the score and exports the report |
| Manifest | public/manifest.json |
Manifest V3, permissions: activeTab, tabs, cookies, storage, webNavigation |
- Open
chrome://extensions - Toggle Developer mode in the top-right corner
- Click Load unpacked
- Select the
dist/folder from this repository - Pin TrackLens to the toolbar and open any web page π
# install dependencies
npm install
# production build β dist/
npm run build
# or run Vite in dev mode for the popup UI
npm run devThen load dist/ as an unpacked extension as described above.
The repo ships with a tiny demo page that sets cookies, writes to storage and fires fake Meta / Google pixel calls so you can see every tab light up.
# from the repository root
python3 -m http.server 8080Then open:
http://localhost:8080/dist/demo/?fbclid=demo123&utm_source=facebook&utm_campaign=test&ad_id=42
Click the TrackLens icon and you should see recognised parameters, a _fbp cookie, a masked api_token in LocalStorage, and at least one detected issue (the fbclid is there but no _fbc cookie is set).
| π | Everything stays local. Inspection happens entirely inside Chrome. |
| π« | No network calls of its own. TrackLens never phones home, never sends the data it captures anywhere. |
| π | No accounts, no API keys, no telemetry. Nothing to sign up for, nothing to configure. |
| π§Ή | Ephemeral storage. Per-tab data lives in chrome.storage.session and is deleted when the tab closes. |
| π | Secrets masked by default. Token-like values are redacted in the UI and in exports. |
tracklens/
βββ public/
β βββ manifest.json # MV3 manifest
β βββ background.js # service worker: navigation + request capture
β βββ content.js # storage snapshot on demand
β βββ demo/index.html # local test page
βββ src/
β βββ main.tsx # popup UI, issue engine, export
β βββ styles.css # dark theme
βββ dist/ # ready-to-load build
βββ assets/ # README artwork
βββ index.html # popup entry
- Manifest V3 boundaries. MV3 does not expose DevTools-grade request/response introspection. TrackLens focuses on request URLs, browser state, navigation and attribution signals that can be captured locally without a backend.
- Heuristic issues. The issue detector is intentionally simple and opinionated. Treat it as a fast smoke test, not a compliance audit.
- Popup-time snapshot. Cookies and storage are read when the popup opens. Hit Refresh after the page changes.
- Decode common pixel payloads (Meta
ev, GA4en) into readable events - Consent-mode awareness (detect CMP state vs. pixel firing)
- Per-vendor request timelines
- Configurable custom parameter & endpoint lists
- Side-panel mode for long debugging sessions
- Optional light theme
Issues and pull requests are welcome. If you have a real-world attribution bug that TrackLens missed, open an issue with an exported JSON report (secrets are masked automatically) and describe what you expected to see.
Released under the MIT License.