Docs menuInstall CentPath › Install the script
Add CentPath to Framer
On this page
Add CentPath to your Framer site as custom code, so every page of your published site counts its visits.
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 Framer project, open Project Settings and pick the Custom Code tab.
- Click Add Script, or the + button if the project already has code. Name it
CentPath, so you can find it later. - Paste the snippet, and place it at the start of the
<head>tag. - Run it on all pages, and choose Once: the script counts each page change after that on its own.
3. Publish your site
Publish your site, so the change reaches your live pages. Framer doesn't load custom code in the canvas or its preview.
Verify the setup
- Open your published site 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
Your visits in Framer's preview don't show
Framer runs custom code only on the published site. Open your site at its live address.
You can't find Project Settings
Some of Framer's guides call this panel Site Settings, with custom code under Code. Look for it there, and add the snippet as above.