On WordPress, the snippet goes into the <head> of every page through the wp_head hook, from a plugin or a child theme. Don't paste it into a theme you didn't write: the next theme update removes it.
1. Copy your snippet
Open your site in trackr.link and copy its snippet. It looks like this, with your own site id:
<script defer data-site="YOUR_SITE_ID" src="https://pulse.trackr.link/t.js"></script>
2. Add it to every page
Choose one of these. Both work with classic themes and block themes. Block themes have no header.php to edit, which is why both go through wp_head.
With a header plugin
Install a plugin that adds code to the site header, such as WPCode. Paste the snippet into its header field and save.
With a child theme
If you already have a child theme or a site-specific plugin, add this to its functions.php:
add_action('wp_head', function () {
if (current_user_can('edit_posts')) {
return;
}
echo '<script defer data-site="YOUR_SITE_ID" src="https://pulse.trackr.link/t.js"></script>';
});
The current_user_can check leaves out your own visits, and those of anyone else who can edit posts, while they are signed in. Remove it to count everyone.
On WordPress.com, plugins and theme code are only available on plans that allow plugins.
3. Keep caching and optimization plugins away from it
The tracker reads its site id from the data-site attribute of its own <script> tag. Plugins that combine, minify or delay JavaScript, such as WP Rocket, Autoptimize, LiteSpeed Cache or SiteGround Optimizer, can move the script into a bundle or rewrite its tag. The tracker then can't find its site id, and it sends nothing, without an error.
In the plugin's JavaScript settings, add t.js to the list of scripts to exclude from combining, minifying and delaying. Then clear the plugin's cache.
4. Track forms and buttons
Each page view is counted on its own. For an action without a page of its own, such as a button click, add a data-trackr-event attribute to the link or button. Core blocks have no field for custom attributes, so in the block editor write the button in a Custom HTML block:
<a href="/pricing" data-trackr-event="cta_click" data-trackr-prop-location="hero">See pricing</a>
For a form, the cleanest signal is its thank-you page. Most form plugins, including Contact Form 7 add-ons, WPForms and Gravity Forms, can redirect to a page such as /thank-you after a successful submit. In trackr.link, add a goal for that path.
5. Consent plugins
trackr.link sets no cookies. If a consent plugin blocks scripts until the visitor agrees, decide whether trackr.link should wait too, and configure the plugin to match. A blocked script records nothing until it is allowed.
6. Check that it works
Sign out, or open a private window, and visit a few pages of your site. Your dashboard opens when the first pageview arrives. If nothing arrives, view the page source and search for data-site. If the tag is missing or has been rewritten, look at step 3 again.
7. Read your first visits
Every visit counts in a channel, such as Organic Search, Email or AI. Channels and UTM parameters lists the rules that decide which one, and AI traffic shows how visits from ChatGPT, Claude, Perplexity and other assistants are recognized. To tag the links you share in campaigns, use the UTM builder.