Skip to content
Docs menuInstall CentPath › Install the script

Add CentPath to Webflow

On this page

Add CentPath to your Webflow site's head code, so every page of your published site counts its visits.

Before you start

Webflow publishes custom code on a site with a paid Site plan, or in a Workspace on a Core, Growth, Agency or Freelancer 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. Paste it into the head code

  1. In Webflow, open your site's Site settings.
  2. Open the Custom code tab.
  3. Paste the snippet into Head code. Code there goes into the <head> of every page, so you paste it once.
  4. Save your changes.

3. Publish your site

Click Publish and publish to your domain. Custom code reaches your live site only when you publish it.

Verify the setup

  1. Open your published site in a new tab and load a page.
  2. In CentPath, look under the steps in Setup → Install: Waiting for your first pageview… turns into First pageview received. once the visit arrives.
  3. 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

The live site doesn't carry the snippet

Publish again: a change to custom code waits until you publish. Then open the page's source and search for your site's id.

Visits to your webflow.io address count too

Webflow can publish your site on its own webflow.io address beside your domain. Pages there load the same snippet, so their visits count too, as a staging copy's do: see Troubleshooting.

You can't save the head code

Your site's plan may not include custom code: see Before you start.