Docs
Parcourir la documentation

Add Privatus Analytics to Webflow

Add privacy-friendly analytics to Webflow through site-wide custom code, handle your webflow.io staging domain and track events with custom attributes.

Voir en Markdown
  1. Open your project and go to Site settings → Custom code.
  2. Paste the snippet into Head code:
html
   <script defer src="https://privatusstats.com/js/pa.js" data-site="pa_YOURSITEID" data-modules="engage,auto,vitals,clicks,ask"></script>
  1. Save and Publish. Custom code only runs on the published site, not in the Designer.

Staging domain#

Your *.webflow.io staging domain isn't one of your site's domains, so its hits are dropped. That's usually what you want. To measure it, add it as an additional domain, or restrict tracking to production explicitly with data-domains="example.com,www.example.com".

Events without code#

Webflow lets you add custom attributes to any element (Element settings → Custom attributes). Add:

Name Value
data-privatus-event Demo request
data-privatus-prop-plan business

The event fires when the element is clicked. On a <form> element (the Form inside a Form Block, not the block around it) it fires when the form is submitted instead. See HTML attributes.