TapCub is live — analytics, insights and live chat, free on one platform
Help center

Where do I paste the TapCub tracking code?

For hand-written HTML, static site generators and custom stacks: where the snippet goes, how it loads, and the two security settings that can affect it.

Getting started2 min readLast updated Oct 28, 2026TapCub teamPart of Install TapCub on your website

Short answer

Before the closing </head> tag, once, in the template or layout that every page of your site uses.

Add the snippet

  1. Copy the snippet. Copy your snippet from Web analyticsConfigurationSDK code. It already contains your site key and looks like this:
    SDK code
    <script defer src="https://static.pathclue.com/client.js" data-site="YOUR_SITE_KEY"></script>
  2. Paste it before </head>. Put it in the shared head template or layout, not in individual pages: the theme’s head partial for Hugo, Hexo, Jekyll or Ghost, the base template for a server-rendered site, or every HTML file if the site really is a folder of pages.
  3. Register the domain and deploy. Make sure the domain visitors use is listed on the same page. Subdomains of a listed domain are accepted automatically; hits from any other host are dropped.

The script is under 3 KB compressed and loads with defer, so it does not block rendering. It sends a pageview when the page loads and again when the URL changes inside the site.

What if the snippet is on a page twice?

Only the first copy runs; the second one notices the first and stops. You will not see double pageviews, but remove the extra copy anyway so the next person editing the template is not confused.

Content-Security-Policy and SRI

If your site sends a Content-Security-Policy header, allow the script host in script-src and the collection host in connect-src. Both are visible in your snippet: the script’s own host, and the host in data-api if the snippet has one; otherwise the script host with static replaced by api. If you turn on chat later, the browser console names any further host it blocks.

To pin the exact file with Subresource Integrity, switch on SRI on the SDK code page. The snippet then points to a versioned file with an integrity hash; copy it again whenever you want to move to a newer version.

Confirm it works

Open a page on the registered domain in a normal browser tab and watch Web analyticsRealtime. Pages opened from disk with file:// are never counted. Next: check that data is arriving.

Did this answer your question?

We use your answers to fix and expand this page.

See your data clearly. Find your growth.

Every click, backed by data. Install one line of code and see your first numbers in a minute.

No credit card · Free plans for analytics and chat · Cookieless analytics