cs_pk_. Find it in CrispStats under Settings, Tracking code, on the HTML tab. The key is safe to publish.
Add the script
1
Copy the tag
example.com with your connected domain.2
Open Custom Code
In your Wix site’s dashboard, open Settings and select Custom Code, under Development & integrations. Select + Add Custom Code.
3
Paste and place it
Paste the tag and give it a name you will recognise, such as
CrispStats. Under Add Code to Pages, choose All pages and load it once per visit. Under Place Code in, choose Head. Save.4
Open your live site
Open your site on its connected domain in a normal browser window, not in the editor. The status row on the CrispStats Tracking code tab shows Receiving events. once the first event has been stored.
Wix’s own help page says custom code needs a published site with a connected domain. The page did not name a specific plan when we read it. Google Tag Manager does not work through Wix custom code, according to the same page, so use the script tag above rather than the Google Tag Manager method.
Check that it works
- Open your live 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. - Click through to a few other pages. Each page change sends another
POST, and the pages appear in CrispStats Realtime within seconds. - Open
https://in.crispstats.com/check?k=cs_pk_xxxxxxxxwith your key."site": "known"means the key is right.
data-domains: it must name the domain visitors use. A visit on a hostname outside the list is not counted. See troubleshooting.
How page changes are counted
A full page load counts once. If a page change happens without a reload and the URL changes through the History API, the script counts the new URL as a pageview too, so clicking through the site in the check above shows whether each page arrives. If the code also runs again on each page, the second copy does nothing, so visits are never counted twice. The same URL twice in a row is one pageview.Add optional modules
Add attributes to the tag in your custom code and save. In HTML, a flag attribute is bare:data-outbound counts clicks to other sites and data-downloads counts file downloads. See script attributes for the rest.
Send custom events
If you can add HTML elements (for example with an embed), putdata-cs-event on a link or button to count clicks:
FAQ
Why can't I find Custom Code?
Why can't I find Custom Code?
Wix’s help page says custom code needs a published site with a connected domain. Publish the site and connect your domain, then look again under Settings.
Can I serve the script from my own domain on Wix?
Can I serve the script from my own domain on Wix?
A forwarding proxy needs a server rule on your domain that sends one path to the collector. Without a way to add one, load the script from
in.crispstats.com as shown here. See ad blockers for what that means for your counts.Next steps
Goals
Count thank-you pages and clicks as conversions.
Exclude your own visits
Keep your own browser out of the numbers.
Troubleshooting
What to check when no events arrive.
Wix details (the Custom Code path, Head placement, All pages scope, the published site and connected domain requirement and the note that Google Tag Manager does not work through custom code) are from Wix’s help page “Wix Editor: Embedding Custom Code on Your Site”, https://support.wix.com/en/article/embedding-custom-code-on-your-site, read on 2026-11-23.