Docs menuInstall CentPath › Install the script
Add CentPath to Wix
On this page
Add CentPath to your Wix site as custom code, so every page of your published site counts its visits.
Before you start
Wix adds custom code only to a published site with a connected domain, and connecting a domain takes a Wix Premium plan.
1. Copy your snippet
In CentPath, open your site, go to Setup → Install and click Copy. The snippet you copy holds your site's own id, so every visit counts for the right site:
<script>window.analytics = window.analytics || Object.assign([], { q: [], goal: function () { this.q.push(arguments); } });</script>
<script defer src="https://centpath.app/script/p.js" data-site-id="YOUR_SITE_ID"></script>2. Add it as custom code
- In your site's dashboard, go to Settings.
- Under Development & integrations, click Custom Code.
- Click + Add Custom Code and paste the snippet into the text box.
- Name it
CentPath, so you can find it later. - Under Add Code to Pages, pick All pages, and choose to load the code once per visit: the script counts each page change after that on its own.
- Under Place Code in, pick Head.
- Click Apply.
Verify the setup
- Open your live site on its domain in a new tab and load a page.
- In CentPath, look under the steps in Setup → Install: Waiting for your first pageview… turns into First pageview received. once the visit arrives.
- If it said First pageview received. before you started, your site has had visits already: look for this one in your dashboard instead. Reload it, and the visit shows in the Visits feed, usually within a minute.
Check your installation shows more ways to check a page.
Troubleshooting
You can't find Custom Code, or can't add it
Your site needs to be published, with a connected domain. See Before you start.
Visits from the editor don't show
Wix runs custom code only on your published site, never in the editor. Load your live site on its domain instead.