Installation
Add one script tag to your website to start tracking. No cookies, no consent banners, no complex setup. The whole process takes about a minute.
Step 1: Get your tracking snippet
After you add a site in Clickport, you'll see this screen with your personal tracking snippet ready to copy:
Click the copy icon to grab the snippet. Your domain is already filled in automatically.
Step 2: Paste it into your website
Open the HTML of your website and paste the snippet inside the <head> tag. It should look something like this:
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>My Website</title>
<!-- Clickport Analytics -->
<script defer data-domain="yoursite.com"
src="https://clickport.io/tracker.js"></script>
</head>
<body>
...
</body>
</html>
The defer attribute means the script loads in the background without slowing down your page. Your visitors won't notice any difference in load time.
Step 3: Verify it works
Back in your Clickport dashboard, open Settings and scroll to the Site section. You'll see your tracking snippet and a "Verify installation" button:
Click "Verify installation" and Clickport will check your website for the tracker. If everything is set up correctly, you'll see a green confirmation message.
Exclude yourself from tracking
You probably don't want your own visits showing up in the analytics. In Settings, find the "Exclude my visits" toggle on the Dashboard tab:
Flip it once per device and your visits are hidden from then on, even if your IP address changes (mobile networks, Wi-Fi switching, VPN). See Exclude Your Visits for the full guide.
Platform guides
The snippet works the same way on any platform. Here's where to paste it on popular ones:
WordPress
Use the Clickport WordPress connector for the easiest setup. It adds the tracker automatically and lets you exclude logged-in admins. Alternatively, paste the snippet into your theme's header.php file or use a plugin like "Insert Headers and Footers."
Shopify
Go to Online Store, then Themes. Click the three-dot menu and choose "Edit code." Open theme.liquid and paste the snippet inside the <head> tag.
Squarespace
Go to Settings, then Advanced, then Code Injection. Paste the snippet into the "Header" field.
Webflow
Go to Project Settings, then Custom Code. Paste the snippet into the "Head Code" section.
Static site generators (Hugo, Jekyll, Astro, etc.)
Add the snippet to your base layout or template file inside the <head> section. It will then be included on every generated page.
Single-page applications
If your site is built with React, Vue, Next.js, Angular, or any other SPA framework, the tracker handles it automatically. It detects client-side navigation and counts each page change as a new pageview. No extra configuration needed.
For more details, see SPA Tracking.
Subdomains
If you have subdomains like blog.yoursite.com or shop.yoursite.com, they'll all roll up under the same site automatically. Just use data-domain="yoursite.com" on each subdomain. Clickport matches subdomains to the parent domain.
Troubleshooting
No data appearing
- Make sure
data-domainmatches the domain you registered in Clickport (withouthttps://or trailing slash) - The tracker auto-disables on
localhostand127.0.0.1to prevent test traffic. You need to deploy it to a real URL. - Check that the snippet is only included once per page (duplicates can cause issues)
- Open your browser's developer console (F12) and look for any errors
Script blocked by ad blocker
Most ad blockers allow Clickport since it doesn't use cookies or fingerprinting. If yours blocks it, you can proxy the script through your own domain. See Script Configuration for setup instructions.