The website tag: what it does and where to find it
On this page
The website tag is the small piece of JavaScript Tapper Block runs on your website. Each entity has its own script, with the entity's key filled in.
What the script does
Block judges an ad click partly by what happens on your site after it. The script runs on every page and reports each visit to Tapper. These checks need it:
| Check | What it tells you |
|---|---|
| Suspicious click behavior | The visit does not look like the way real visitors behave on your site. |
| Suspicious ad clicks | The same visitor reached your suspicious ad clicks limit: that many recent visits with no activity on the page. |
| Minimum seconds on site | Several of the visitor's recent visits were shorter than your minimum seconds on site. One short visit on its own is not enough. |
| JavaScript disabled | A browser with JavaScript disabled clicked your ad. |
| Bot, Fake user agent, Tampered device | The visit shows signs of automation, or the browser or device identifies itself as something it is not. |
| Aborted ad click | Most of the recent Google Ads clicks from an IP address never loaded your page. |
Conversions and web click tracking links rely on it too.
Where to find it
- With more than one entity, pick the entity in the switcher at the top of the sidebar.
- Under Setup, click Website, then Monitoring.
- Open the Install script and consent tab. Monitoring script is the first section.
If the tab asks you to connect an ad platform first, connect an ad account to the entity.
The same script appears in setup, at Install website monitoring. If you installed it then, you do not need to install it again.
The snippet
<!-- Tapper Monitoring Script -->
<script>
var script = document.createElement("script");
script.src = "https://monitor.tapper.ai/bundle.js";
script.async = true;
script.onload = function () {
window.tapper.init("{public key}");
};
(document.head || document.body || document.documentElement).appendChild(script);
</script>
<noscript>
<img src="https://protect.tapper.ai?pk={public key}" alt="Tapper"/>
</noscript>
<!-- Tapper Monitoring Script -->
The app fills in {public key} for you, so always copy the script from the app. How it loads without holding up your page is in Does the website tag slow down my website?
The section has:
- A copy button at the top right of the code box, which copies the snippet with your key.
- Google Tag Manager, which opens tagmanager.google.com.
- A Content Security Policy box listing the sources your site must allow if it sends that header.
- Open the install guide, under "Need help installing the website tag?", which opens the website tag guide on docs.tapper.ai.
Where it goes on your site
Install it once on every page, one of these ways:
- Directly in your HTML. Paste it right after the opening
<body>tag, in the template every page shares. - Google Tag Manager. See Add the website tag with Google Tag Manager.
- Shopify. See Install Tapper on a Shopify store.
- PrestaShop. The PrestaShop snippet under Conversion script replaces the website tag, so install that one only. See Install the conversion script: GTM, Shopify, PrestaShop or JavaScript.
On WordPress or another site builder, use Google Tag Manager or the builder's option for adding code right after the opening <body> tag.
After you install it
- If your site sends a Content Security Policy header, the browser can refuse the script. See Allow Tapper in your Content Security Policy.
- If your site asks for cookie consent, set the cookie policy on the same page. See Cookie policy, consent snippets and recognizing visitors without cookies.
- Check that the website tag is working on your site.