Documentation
Heatmaps, session recordings and ad conversion export
Three optional add-ons show what people do on a page and send your revenue back to ad platforms. Each one is opt-in: nothing changes on your site until you turn it on. Heatmaps and recordings need no extra script: once you turn them on, your normal tracking tag loads them by itself. The main tracking script stays under 4 KB either way.
If you serve the tracker through a first-party proxy, forward all of /js/*, not only /js/script.js, so the tracker can load its add-ons from the same place.
Click heatmaps
Open Settings → General → Tracking add-ons and tick Click heatmaps (or use Turn on in the empty heatmap card). Your tracking tag starts loading the heatmap add-on within a minute.
You can still add it by hand instead. A hand-installed copy and the one the tracker loads never both run:
<script defer data-website-id="YOUR_SITE_ID" src="https://t.analyticfast.com/js/script.js"></script>
<script defer src="https://t.analyticfast.com/js/heatmap.js"></script>
The heatmap shows up on your dashboard after the first clicks. Pick a page and a device (desktop, tablet or mobile) to see where people click, plus the most clicked buttons and links.
How it works:
- Each click is saved as a coarse position: 2% of the page width across and 20 pixels down. Clicks are sent as one batch per page, when the visitor leaves or switches page.
- The add-on never reads or sends field values or typed text. It records the clicked element's tag, id, two class names and, for buttons and links, up to 30 characters of their text.
- Elements inside
data-af-ignoreare skipped. - Batches go through the main tracker, so opt-out (
?ml_ignore=true), cookieless mode and bot filtering all apply. - To record only part of your traffic, add
data-heatmap-sample="0.25"to your tracking tag to keep 25% of page views (ordata-sample="0.25"on a hand-installed heatmap tag).
Heatmap clicks are stored as daily totals and don't count toward your monthly event quota. Each site stores up to 3,000 clicks a day, and the dashboard says on which days the limit was reached. Reports cover up to 31 days at a time.
The page behind the heatmap is your live page, loaded with scripts turned off. Pages that render with JavaScript, or that block being embedded, show blank behind the dots, but the click positions are still correct.
Session recordings
Recordings let you replay a sample of real visits: mouse movement, scrolling, clicks and page changes. They are built on rrweb and stored in Cloudflare R2.
Open Settings → Dashboard → Session recordings. Turn on Record sessions and choose what share of sessions to record (10% is a good start) and the daily limit. Your tracking tag then loads the recorder by itself; there is nothing to paste.
Sites installed before this worked may also have the recorder tag by hand. It keeps working and never runs twice:
<script defer data-website-id="YOUR_SITE_ID" src="https://t.analyticfast.com/js/recorder.js"></script>
The recorder is a small loader. It first checks whether recordings are on and whether this session was sampled, and only then downloads the recorder itself (about 24 KB gzipped). Unsampled visitors download nothing else.
Privacy:
- Every form input is masked: typed text, passwords, card fields and selects are never captured.
- Mask all page text replaces every piece of text on the page with asterisks, for pages that show personal data.
- Add
data-af-maskto an element to mask its text, ordata-af-block(ordata-af-ignore) to replace it with an empty box. - Recordings stop after 30 minutes, are never made in iframes, by automated browsers or for opted-out visitors, and are unavailable in cookieless mode.
- Recordings are kept for 30 days. Admins can delete one from the player list. Deleting a visitor's data also deletes their recordings.
- Recordings and their content are never shown on shared dashboards and are not available through API tokens.
Session recordings are personal data in many countries. Mention them in your privacy policy and ask for consent where your visitors' law requires it.
Self-hosting recordings
Recordings need an R2 bucket bound as RECORDINGS. Without it the dashboard explains that recordings are unavailable and the recorder stays off. Add this to wrangler.jsonc and deploy:
"r2_buckets": [{ "binding": "RECORDINGS", "bucket_name": "analyticfast-recordings" }]
Add a lifecycle rule so R2 deletes chunks after 30 days, matching the index:
npx wrangler r2 bucket create analyticfast-recordings
npx wrangler r2 bucket lifecycle add analyticfast-recordings expire-recordings --expire-days 30
Set RECORDINGS_GLOBAL_DAILY to limit new recordings per day across all sites (2,000 by default), which keeps R2 writes and storage inside the free tier.
Ad conversions
AnalyticFast keeps the ad click id from the landing URL of each visit: gclid, gbraid and wbraid (Google), msclkid (Microsoft), fbclid (Meta), ttclid (TikTok) and li_fat_id (LinkedIn). Click ids are visible only to admins and owners.
Open Settings → Revenue → Send conversions back to ad platforms to download paid orders matched to the click that brought the visitor in (within 90 days before the order). Refunds are left out.
- Google Ads CSV follows Google's click conversion import template, with times in UTC. Upload it in Google Ads under Goals → Conversions → Uploads. The conversion name must match a conversion action set to import from clicks. Only
gclidclicks are included. See Google's import guide. - All click ids (CSV) lists every click id with its type, time, value, currency and order id, to fill in the upload templates for Meta, Microsoft, TikTok or LinkedIn.
The download links call GET /api/sites/{siteId}/ad-conversions.csv?format=google&name=Purchase&period=30d (or format=generic), which needs a signed-in admin or owner. API tokens cannot download click ids.