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

Install TapCub on your website

One script covers analytics and live chat. This guide shows where to paste it, how to confirm data arrives, and what to check if Realtime stays empty.

Getting started6 min readLast updated Sep 28, 2026TapCub team

Before you start

You need a TapCub account and a site created in the console. If you have not created one yet, follow Add a site first — it takes about two minutes and gives you the site key used below.

You also need to be able to edit the template that renders every page of your website, or the "custom code" area of your site builder. Nothing is installed on your server.

Analytics and live chat share this one script. Installing it does not show a chat bubble; chat stays off until you enable it in the widget guide.

Add the script

Open Web analyticsConfigurationSDK code and copy the snippet shown there. It already contains your site key. It looks like this:

index.html

<script async src="https://app.tapcub.com/w.js" data-site="YOUR_SITE_KEY"></script>

Paste it before the closing </head> tag on every page. The script is about 2 KB gzipped and loads asynchronously, so it never blocks rendering. It sends a pageview on the first load and on later in-site URL changes.

  1. Register the hostname. On the same SDK code page, add the domain visitors use, without https:// or a path. Subdomains are allowed. Hits from an unregistered host are dropped silently.
  2. Paste the snippet. One copy per page. If a page ends up with two copies, only the first one runs.
  3. Deploy and open the site. Open a page on the registered hostname in a normal browser tab. A local file opened with file:// does not send.

Site builders and CMS

There is no plugin to install. Every site builder has a place for site-wide header code, and the snippet goes there once:

PlatformWhere to paste
WordPressTheme header (header.php) or a "header scripts" box in your theme or a header-code plugin. Once in the global template, not per post.
Shopifytheme.liquid, inside <head>. The platform-hosted checkout does not run theme scripts, so checkout pages are not tracked by this tag.
Webflow / Wix / SquarespaceSite settings → custom code → head. Use the site-wide field, not the page-level one.
Hugo, Hexo, Jekyll, Ghost, TypechoThe shared head partial of the theme.
Next.js, Nuxt, Vue, ReactThe root layout or app shell. Single-page apps are covered — the script listens for route changes. If your router uses # URLs, add data-hash="true" to the tag.

If your theme caches rendered HTML, clear that cache after you change the header, or the old pages keep serving without the tag.

Verify the first visit

Open Web analyticsRealtime in one tab and load your site in another. The pageview should appear within a few seconds with the same path and title.

If it does not, open the browser's network panel and check two requests in order:

  1. w.js loaded. If it is missing, the tag is not in the page, or a browser extension blocked it.
  2. A POST to /api/v1/pulse. If the script loaded but no POST follows, the browser stopped the request (see below). If the POST exists but Realtime is empty, the hit was dropped on our side — most often because the hostname is not registered.
The collect endpoint answers 202 for stored and dropped hits. A 202 proves the request arrived, not that it was counted. Realtime is the only proof.

Common install problems

What you seeLikely cause and fix
Script loads, no POSTThe browser sent Do Not Track or Global Privacy Control. TapCub honors both by default and the script returns immediately. Test in a browser without those flags.
No POST, console shows a CSP errorYour Content-Security-Policy must allow script-src and connect-src for the TapCub origin. Chat, identity and autocapture load from the same directory.
POST exists, Realtime emptyHostname not registered, site paused, monthly quota used up, or an exclusion rule matched. Check the SDK code page and plan usage.
Works on production, not locallylocalhost does not send by default. Register it only while testing.
Single-page app counts one pageviewHash routing needs data-hash="true". Frameworks that replace history.pushState late may need the tag earlier in the head.

Still empty after these checks? Send us the page URL and a screenshot of the network panel through the contact page; that is usually enough to find it in one reply.

What to turn on next

Was this guide helpful?

Your answer helps us decide which guides to expand next.

Thanks for the feedback. If something is still unclear, tell us what you were looking for.

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