Add tracking to your website
The RadarSend tracking snippet 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 snippet 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 snippet 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 snippet#
- 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 snippet, 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.
Use only one snippet 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 snippet…. The wizard has instructions for Paste in HTML, Google Tag Manager, WordPress, Shopify and Webflow.
In Google Tag Manager, add the snippet 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. Active now shows who’s on your site right now, and anonymous visitors appear alongside known ones.
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 snippet 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 snippet 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.
Good to know#
- The snippet 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.
- 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).