Embed script v12
Our public script is now at v12. You get it automatically with latest.js. If you use SRI, update to the v12 script and hash.
New features
- Inline events are part of the main script: add
data-simple-eventto clicks and form submits, withdata-simple-event-*attributes as metadata. - Optional 404 detection:
data-detect-404="true"sends apage_404event. - We collect the names of query parameters that have a value. For example,
gclidtells paid from organic traffic. We still only collect values of UTM codes,ref, and allowed parameters. Opt out withdata-ignore-metrics="querykeys". - Overwrite the referrer with
data-referrerorsa_settings.referrer. - Optional time on page pings:
data-pings="5,60"sends the visible time at those seconds. - Automated events collect clicks on phone (
tel:) links. - Inline and automated events use
fetchwithkeepalivewhen the browser supports it, with an image request as fallback, so they are more likely to arrive when the visitor navigates away.
Improvements and fixes
- Time on page is reliable on mobile and only counts visible time.
- Automated events no longer block or delay links: Cmd, Ctrl, and middle clicks work, and there’s no 5 second delay.
- Automated events work with a custom namespace and skip links with
data-simple-event. - Visitors arriving through a Cloudflare challenge are counted as unique.
- Ignoring
scrolledno longer drops the screen size. - Manual page views with a different query string are no longer merged.
data-allow-paramsis case-insensitive.- Fixed false bot detection with the Phantom wallet extension.
- Removed the retired Cloudflare app build.
If you are a developer you might want to see what changed in our open-source repository.