InstallPlatforms
Google Tag Manager
Add trckable through Google Tag Manager with a Custom HTML tag.
If you already run Google Tag Manager, a Custom HTML tag can load trckable. A script tag in the page is lighter and less often blocked, so use this only when GTM is the way you can reach the site.
Steps
- In Tag Manager, open your container and click Tags → New.
- Choose Custom HTML as the tag type and paste the script tag below.
- Under Triggering, choose Initialization - All Pages.
- Save, click Submit, and Publish the container.
<script
defer
data-site="tkb_a1b2c3d4"
data-domain="example.com"
src="https://stats.example.com/js/tkb_a1b2c3d4.js">
</script>Check it works
Open your site in a private window, then open your trckable dashboard and look at Live. Your visit shows up within a minute.
If it does not show
- The container is not published. A saved workspace does nothing until you publish it.
- Visitors with a tag-blocker never load GTM, so nothing runs. This is why the script tag in the page counts more.
- The trigger is not on All Pages. Use Initialization - All Pages.
Still stuck? Run npx trckable doctor against your site, or see the script tag page.