Setting up Measurebase: the complete guide
Setting up server-side tagging is often seen as something really complicated. Fortunately, it's not that bad. And with Measurebase we try to lower the bar even further. In this guide I'll take you through the installation process step by step, so you know exactly what you do and don't need to do to get your tracking set up properly.
📋 Before you start
Have these ready and the whole guide takes about fifteen minutes of actual work:
- Access to your DNS provider
- A GTM Web container
- A GTM Server container
01 · Creating your account
Creating a Measurebase account is dead simple: you don't pick a plan up front and there's nothing to configure yet. Everything below is optional and can happen later too. Sign in with Google, or create an account with your email address and verify it with a single click.
Create your first account (workspace)
Once verified, you land on the Accounts screen. Click "Add account" and give it a name. Every new account starts on the free Starter plan automatically, so there's nothing to choose here yet.
Working with multiple clients?
An Agency account is a distinct account type that lets you manage multiple Client accounts from one dashboard (Partner → Clients). You invite a client by email address or by their existing GTM Container ID, but the client has to approve the link before you can access anything. And an agency can never touch the billing of a client's own subscription.
Account created? Then your workspace is ready - on to the domain that will soon be doing all the work.
02 · Creating your first domain
Add the domain
Go to Domains → "+ New domain" and fill in:
- Name: a recognizable label, for example "Main website".
- Tagging subdomain type:
- Use my own domain - this is the default option, and the one you want: it delivers the real first-party benefits.
- Use a Measurebase subdomain - this option skips DNS entirely, but you give up the first-party benefits of server-side tagging (cookie lifetime, less ad-blocker interference). Treat it as a quick test, not an option for production.
- Domain: your root domain, for example yoursite.com.
- Tagging subdomain: a prefix, for example mbase (giving mbase.yoursite.com). Feel free to pick something else. Tip: to be safe, avoid sst or sgtm or other terms ad blockers recognize easily.
- Server container config: paste the server container config string you get when creating a GTM Server container. In GTM: Admin → Container Settings → Manually provision tagging server.
- Region: fixed to Amsterdam, Netherlands (EU).
How many domains you can add depends on your plan: 1 on Starter and Solo, 3 on Growth, 5 on Scale, 10 on Business and custom on Enterprise.
Domain added? Then exactly one DNS record is waiting for you now.
03 · Adding your DNS record
Open the new domain's Settings page. It shows exactly one A record you need to add.
Copy the Host and Value shown, add the record at your DNS provider and click Verify DNS.
Once DNS has propagated (usually within a few minutes) an SSL certificate is issued automatically and the domain's status jumps from Pending to Active.
Double-check it yourself
Want a check that's independent of the dashboard? Open https://mbase.yoursite.com (your own tagging subdomain) in a browser tab; nothing needs to be on your site for this yet. If DNS has propagated and the certificate has been issued, the page loads without an error or certificate warning. See either one? Wait a few minutes and try again.
Running more than one setup
Need a second GTM property on the same root domain, or a separate setup for a sister brand? Add the domain again with a different subdomain. Each setup gets its own, fully independent tagging server, up to your plan's domain maximum.
DNS in place? Then the domain is Active and the best part is coming up: watching your first hit arrive.
04 · Installing the tracking script - and removing your old one
Generate your script
Open the domain and click Generate script. Enter your GTM web container ID (GTM-XXXXXXX) and choose a version:
- Enhanced (default and recommended): a masked loader path with a
?mb=parameter, much harder for ad blockers and browser privacy filters to recognize.- Enhanced ad blocker protection is on by default here: its guard tag is automatically included at the top of your head snippet and the power-up is switched on for this domain as you generate, so every follow-up request gets masked too. Don't want that? Just untick it.
- Standard - the familiar
gtm.js?id=pattern. Pick this only if GTM's preview and debug mode absolutely must behave exactly like a stock, unmodified install.
Install it
Just like with the regular GTM script, you get two snippets.
- Head script: paste the head snippet as high as possible in
<head>. - Body script: paste the body snippet directly after the opening
<body>tag; exactly where Google's own GTM instructions put it too.
⚠️ Remove your old snippet
If you were running standard Google Tag Manager before, there's still an old pair of snippets loading gtm.js straight from googletagmanager.com: a <script> block in <head> and a matching <noscript><iframe> in <body>. Remove them both completely. If the old and new snippets run side by side, every tag fires twice and all your numbers quietly double; this is by far the most common data problem you can give yourself (see Troubleshooting).
Leaving the install to a developer
Someone else installing the script? Use Send instruction email, right in the Generate script panel. You enter an email address and they receive both snippets plus the install and testing steps, without you copying or pasting anything.
Snippets pasted and the old pair removed? Then your tracking now runs over your own domain.
05 · Setting up power-ups - and deciding which to use
You'll find every power-up on a domain's Advanced tracking tab. Each one is optional and reversible, and you don't need any of them for plain basic tracking.
| Power-up | What it does | Configuration |
|---|---|---|
| Data Enrichment | Adds visitor geo (country/region/city/postal) and device (OS/browser/engine/bot/mobile) signals as request headers, readable via GTM's Request Header variable | Master toggle + 11 individual header toggles, all on by default |
| Cookie Keeper | Re-issues recognized first-party marketing cookies on every request, keeping them alive past Safari ITP's 7-day cap on JS-set cookies | Master toggle + per-cookie toggles across 10 vendor groups (35 cookies), all on by default |
| Click ID Restorer | Recovers ad-platform click IDs stripped by Safari/Brave from landing URLs, plus cookie-based recovery for others | Google/Microsoft backup parameter names (free text) + 3 independent toggles for Meta/TikTok/Pinterest |
| IP Anonymization | Masks every visitor's IP before it reaches your server container (IPv4 last octet zeroed, IPv6 keeps only its /48) | Single toggle |
| IP Filter | Blocks specific IPs or ranges - your own office, agency, or QA traffic - from being tracked at all | Single toggle + a free-text list of IPs/CIDR ranges |
| Enhanced Ad Blocker Protection | Rewrites ongoing requests into the same masked format as the Enhanced loader, so blocklists can't fingerprint fixed paths like GA4's /g/collect | Turning it on happens via Generate script (on by default there), so the guard tag and the switch always land on your site together; turning it off lives on the power-up's own page. That page also shows whether masked requests are actually arriving |
| Auto Grant Consent | Forces every hit's consent signal to read as fully granted, so you can verify tag firing without clicking through your own consent banner | Single toggle; testing only, see below |
🚫 Auto Grant Consent - testing only
Leave this on and the page itself shows an increasingly insistent warning, and after 24 hours Measurebase's monitoring opens a real alert on your account. So turn it off as soon as you're done testing; in production this should never be on.
Power-ups configured to taste (or simply skipped, that's fine too)? Then it's time for the proof.
06 · The proof: your first hit
Time to see whether all that pasting adds up to something. Your install is only really done once you can tick off these five points:
- The domain's status is Active, not Pending. Stuck on Pending? Then DNS usually hasn't propagated yet; see Troubleshooting.
- Fire a real hit - open your site in a normal (or incognito) tab and click around, or send a test event from GTM's preview mode.
- Check the request logs - a new row should appear in no time, with a green 200 status. Nothing yet? Click Refresh on the logs page: it pulls the logs on demand instead of waiting for the next scheduled round, so your test hit shows up right away.
- Confirm it in GTM itself - in your server container's preview and debug mode you should see the request arrive and your tags fire.
- Using Enhanced Ad Blocker Protection? Then open that power-up's page: it should say "Working - masked requests are reaching this domain's container". If it says no masked requests have been seen yet instead, your site isn't loading the guard tag yet.
All five ticked? Congratulations: your server-side tracking is up. What comes next is making sure it stays that way.
07 · Managing notifications & alerts
Set your no-data threshold
Configured per domain, on its Settings page under Monitoring: "Alert me if no data for", from 1 to 168 hours (a full week), 24 hours by default. Raise the threshold for a quiet B2B site where a silent weekend is normal, and lower it if you want to know within the hour on a busy site. New domains get a short settling-in period before this check switches on.
Connecting Slack
Up to 3 channels or workspaces per account, connected via Settings → "Add to Slack". That's a regular OAuth flow, so no fiddling with webhooks. Every connected channel receives every alert; filtering per channel by type or domain isn't possible. A domain alert names the domain in the message, an account-wide alert (like quota) names the account.
Alerts configured? Then you no longer need to check in here every day - the monitoring does that for you from now on.
08 · Infrastructure check: CDN, caching & CSP
For most setups, sections 2 and 3 are all you need. A few infrastructure layers can get in the way if you're already using them, though; so walk through this once (five minutes of work), especially if your site sits behind a CDN or a strict CSP.
A CDN in front of your own site
Does your whole domain run through Cloudflare, Fastly or something similar? Then make sure your tagging subdomain's record isn't being intercepted, cached or rewritten, unless you've deliberately set it up that way. The safest option is to keep the tagging subdomain out of the proxy entirely (a plain "DNS only" record), so traffic reaches Measurebase directly. If it has to go through the proxy, disable caching for exactly that hostname.
Caching
The loader script itself can be cached briefly, but the collect requests (every real tracking hit) must always reach Measurebase live. So watch out that a broad rule like "cache everything under this path" in your CDN or reverse proxy doesn't also catch your tagging traffic.
Content-Security-Policy
If your site sends a CSP header, the script-src and connect-src directives (and img-src, for when a browser ever falls back to a pixel) need to allow your tagging subdomain. Because it's first-party (the same root domain as your site), a wildcard like *.yoursite.com already covers it in most policies. But a CSP that demands exact hostnames silently blocks the loader until you add the new subdomain explicitly.
🛟 The safety net
If one of these things does slip through unnoticed after go-live, that's exactly what the monitoring exists for.
And that's it: about fifteen minutes of work, and your tracking now runs on your own turf.
09 · Troubleshooting common problems
| Symptom | Likely cause & fix |
|---|---|
| Numbers look doubled | Your old GTM snippet is still running alongside the new one. Go back to section 4 and remove it completely. |
| Attribution keeps resetting on Safari / iOS | Check Cookie Keeper is actually on for the specific vendor's cookie you care about - toggles are per-cookie, not one global switch. |
| A chunk of traffic seems to vanish, especially in Firefox/Safari/Brave | An ad blocker or privacy filter is likely catching your requests. Switch to the Enhanced loader if you're still on Standard, and leave Enhanced Ad Blocker Protection on when generating it - its power-up page shows whether masked requests are actually arriving. |
| The request log is full of alarming-looking 400s | Check the Status badge, not just the response code - a Pending badge on a GA4/gtag request is marked "NO DATA LOST" and is a normal benign retry. Only Error rows mean something actually failed. |
| A domain won't leave Pending | DNS hasn't propagated yet, or doesn't exactly match what's shown on the domain's Settings page. Re-check the Host/Value, wait a few minutes, then click Verify DNS again. |
| An unfamiliar domain shows up as a Referer in your logs | The foreign traffic check doing its job - someone reused your tracking snippet elsewhere. Worth tracking down and fixing at the source. |
| Tracking stops and a banner says it's paused | You've hit your plan's request quota for this cycle. Check Billing - upgrade, wait for the next cycle, or turn on auto-upgrade so this doesn't happen unnoticed again. |
| Auto Grant Consent was left on longer than intended | Turn it off from Advanced tracking right away. Past 24 hours, expect (and don't worry about) the alert Measurebase already opened about it. |