Add Privatus Analytics to Framer
Add cookieless analytics to a Framer site through custom code, track single-page navigation automatically and count clicks with a data-privatus-event attribute.
- Open your project and go to Site settings → General → Custom code.
- Paste the snippet into End of
<head>tag:
html
<script defer src="https://privatusstats.com/js/pa.js" data-site="pa_YOURSITEID" data-modules="engage,auto,vitals,clicks,ask"></script>
- Publish.
Framer sites are single-page apps: page changes use history.pushState,
which the tracker follows automatically.
Your *.framer.app preview domain isn't one of your site's domains, so its
hits are dropped unless you add it.
Events#
Give an element a data-privatus-event attribute (for example through a
code override) and clicks on it are sent as an event with that name. See
HTML attributes.