Add the script
1
Copy the Webflow snippet
In the CrispStats dashboard, open your site’s Settings, select Tracking code and choose the Webflow tab. It has your public key filled in:
2
Paste it into Head code
In Webflow, open your project’s Site settings, go to Custom code and paste the tag into Head code. Save the changes. Webflow only allows site-wide custom code on a paid site or workspace plan.
3
Publish the site
Custom code runs only on the published site, not in the Designer. Publish to your domain, then open the live site in a browser. The status row on the CrispStats Tracking code tab shows Receiving events. once the first event has been stored.
Add optional modules
The switches under Extra events on the Tracking code tab add attributes to the tag. Copy the updated tag from the Webflow tab, replace the one in Head code and publish again. For example, with outbound links and file downloads on:webflow.io staging domain, add data-domains with your own domain so visits to the staging copy are not counted. See script attributes.
Check that it works
- Open your published site with the browser’s developer tools on the Network tab. You should see
d.jsload fromin.crispstats.comand aPOSTtohttps://in.crispstats.com/ethat gets202. - Open the page source and search for
in.crispstats.com/d.js. If it is missing, the site was not published after you saved the head code, or you are looking at a page that was cached before. - Open
https://in.crispstats.com/check?k=cs_pk_xxxxxxxxwith your key."site": "known"means the key is right. The visit appears in Realtime within seconds.
data-domains: a visit on the webflow.io staging address does not count when only your own domain is listed, which is usually what you want.
How page changes are counted
Each page of a Webflow site is a full page load, so the script counts one pageview per page. Links to a section on the same page (#pricing) are not new pages: the script drops the fragment unless the tag has data-hash, which a Webflow site does not need. UTM parameters on links into your site are kept, so campaigns show under Sources.
Send custom events
- Clicks on a button or link: where you can set custom attributes on an element, add an attribute named
data-cs-eventwith the event name as its value, such assignup click. Adddata-cs-prop-planwith a value to send a property. No JavaScript is needed. See declarative events. - Form submissions: point the form’s redirect at a thank-you page and add a goal with a Page visit rule for that path.
- Clicks to other sites and file downloads: turn on Outbound links and File downloads to add
data-outboundanddata-downloadsto the tag.
FAQ
Why do I see no visits from the Designer?
Why do I see no visits from the Designer?
Custom code runs only on the published site, not in the Designer. Publish, then open the live site.
Do visits to my webflow.io address count?
Do visits to my webflow.io address count?
Only if that hostname is in
data-domains. List only your own domain to keep staging visits out.Next steps
Declarative events
Track button clicks with
data-cs-event attributes, no JavaScript.Script attributes
Every option the script tag accepts.
Troubleshooting
What to check when no events arrive.