Add tracking to your website
The RadarSend tracking code is one line of HTML you add to every page of your website. It records the pages people visit, and when someone arrives from one of your emails, it connects those visits to their Contact. You can then see a contact’s visits on their timeline, build segments from them, and start sequences when someone views a page.
It also feeds bot filtering. A security scanner can click every link in an email, but it rarely scrolls a page or moves a mouse, so real visits help RadarSend tell people from machines.
Before you begin#
- A tracking domain that’s live. The tracking code is served from it. See Set up your tracking domain.
- A way to edit your website’s shared header, or a tag manager.
What it records#
Once the code is on a page, it records the following without any extra code:
- Page views. The address, page title, and the page the visitor came from, including UTM tags such as
utm_sourceandutm_campaign. Single-page apps are covered too: a new page view is recorded each time the address changes. - Engagement on the page. How far down the visitor scrolled and how long they were actively on the page. Time with the tab hidden or the visitor idle for over a minute isn’t counted.
- The visit. Device type, browser, operating system and approximate location (country, region and city). RadarSend keeps a scrambled (hashed) version of the IP address, never the address itself.
A visit ends after 30 minutes without activity. The next page view starts a new one.
Add the tracking code#
- Go to Settings→Website tracking.
- Under Tracking script, pick where the script is served from. Served from your tracking subdomain works everywhere. Served by your website is offered when your site runs the RadarSend worker, and it can keep cookies longer in some browsers.
- Under Your tracking code, click Copy. It looks like this:
<script src="https://t.example.com/_q/qs.js" data-tenant-key="your-key" async></script>
- Paste it just before the closing
</head>tag on every page of your site. The usual place is your theme’s shared header or layout file, which covers every page at once.
Add the code only once per page. The data-tenant-key value tells RadarSend which account the visits belong to, so copy it exactly.
For step-by-step notes for your platform, click Install the tracking code…. The wizard has instructions for Paste in HTML, Google Tag Manager, WordPress, Shopify and Webflow.
In Google Tag Manager, add the code as a Custom HTML tag with the All Pages trigger, then publish your container.
Check it’s working#
After I’ve added it, the wizard moves to Verify and waits for a first page view. Open your site in another tab and load a page. When RadarSend receives the visit, the wizard shows Website tracking is on.
You can also come back to Settings→Website tracking later and click Re-check.
How visits connect to a contact#
A visitor starts out anonymous. RadarSend connects their visits to a contact when any of these happen:
- They click a link in one of your emails. The click carries who they are to your site, so that visit and later ones belong to them.
- They submit a RadarSend form. See Create and embed a form.
- Your site identifies them with
_qp.identify(), or your server does through the API. See Identify visitors and track events.
When a visitor is connected, the pages they viewed earlier in that browser are added to the contact too. So a new signup comes with the landing page and pricing page they read before filling in the form.
Where you’ll see the data#
- On the contact. Open a contact and choose the Activity tab. The Web filter shows their visits and the pages they viewed. Events your site sends appear on the same timeline.
- In segments. Under Web Activity, Visited site matches visits by page address, UTM tags, visit length, pages viewed or referrer. Under Engagement Depth, Viewed a page matches a single page view. Attribution has each contact’s first and last touch. See Build a segment.
- In sequences. The Visited a page trigger enrolls a contact when they view a page you choose. See Sequence triggers.
- In Insights → Web Traffic. At the bottom, Bot traffic filtered counts the visits kept out of your numbers. Click it to see why each group was filtered, and how many visits were uncertain (see Bots and uncertain visits).
- In Insights. On the Signals tab, On your site now lists everyone on your site in the last five minutes, known contacts and anonymous visitors together: the page they’re on, where the visit came from, and how far in they are. Below it, Last 24 hours on site counts visitors and the people who became known.
Bots and uncertain visits#
Every visit is checked once it ends (after 30 minutes without a new page) and lands in one of three groups:
- Visitors. Counted in your reports.
- Bots. Kept out of your reports. These include email security systems that open links to check them, crawlers, automated browsers, and AI assistants’ browsing agents (for example ChatGPT visiting your site on someone’s behalf).
- Uncertain. A short visit from a home or office network that left before showing it was a person, with nothing pointing to a bot either. Uncertain visits aren’t counted as visitors or as bots. If engagement from that visit arrives later, it becomes a visitor.
A visitor who has read your site before, from the same browser, counts as a visitor on a quick return too.
Exclude your own traffic#
Your own and your team’s browsing can outnumber real visitors on a new site. To leave it out:
- Go to Settings→Website tracking.
- Under Exclude internal traffic, click Add my current IP, or type an address or range (for example
203.0.113.0/24) and click Add.
Visits from those addresses stop being recorded within a minute. Earlier visits stay as they are. Ranges can be up to /16 for IPv4 and /32 for IPv6. Add my current IP adds your whole /64 when you’re on IPv6, because IPv6 addresses change often.
Common issues#
- The wizard never sees a page view. Open your site, view its source, and search for
qs.js. If it isn’t there, the code didn’t publish: re-save your theme, or publish your tag manager container. If it’s there, check thatdata-tenant-keymatches what’s shown in Settings→Website tracking. - The code is on the page but nothing arrives. A strict Content Security Policy can block it. Allow your tracking domain in
script-src,img-srcandconnect-src. - Visits from an email click show as anonymous. When your tracking domain and your website are on different root domains (for example
t.example.comandshop.example.net), browsers treat RadarSend’s cookies as third-party and can block them. A tracking domain on the same root domain as your website avoids this. - Some visits are missing. Ad and privacy blockers stop tracking scripts for some visitors. That’s expected, and email click reporting isn’t affected.
- Your own visits still show up after you excluded your IP. Your browser may reach your website over IPv6 and RadarSend over IPv4, or the other way round. Add both addresses. On a phone, mobile data changes address often, so browse on Wi-Fi.
Good to know#
- The code loads with
async, so it doesn’t hold up your page. - Known bots are filtered out before anything is recorded, and visits from suspected bots are marked so they stay out of your reports. See Bots and uncertain visits.
- If your site needs visitors to accept analytics cookies first, turn on consent mode. See Ask visitors for consent before tracking.
- RadarSend sets three cookies:
_emt(who the visitor is, 1 year),_emts(the browsing session, 1 year) and_emc(a recent email click, 24 hours). They’re first-party when your tracking domain is on the same root domain as your website, and third-party otherwise (see Common issues).