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. By the end, your server-side tracking runs on your own domain, from the first DNS record to the first audit.
📋 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 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".
- Domain: your main domain, for example yoursite.com. A leading www. is stripped for you, and Measurebase checks straight away that the domain is valid, has a real top-level domain and an existing DNS zone.
- 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: connect Google Tag Manager or paste the config, see below.
- Region: fixed to Amsterdam, Netherlands (EU).
Connect Google Tag Manager, or paste the config
Measurebase needs to know which server container to host. You choose how it finds out:
- Connect Google Tag Manager: sign in with Google right inside the dialog, pick the GTM account and your web and server containers, and Measurebase reads the server container config itself. Google asks for read access to your containers plus edit access limited to Measurebase's own workspace. Connected, the tracking audit also checks both containers (see section 7).
- Paste the config: paste the server container config string you get when creating a GTM Server container. In GTM: Admin → Container Settings → Manually provision tagging server.
Pasted the config for now? You can still connect Google Tag Manager later on the domain's settings page, and disconnect it at any time.
Tracking setup and first audit
With Google Tag Manager connected, the dialog asks two more things. Tracking setup: what this domain should measure, and which e-commerce data layer your shop pushes (or none for a site without a shop). First audit: optional. It reads the live server container (and the web container, if you picked one), runs a site crawl and checks routing, consent, duplicates and the alignment with your measurement setup. If you paste the config instead, the first tracking audit runs automatically tonight, once the DNS record is in place.
How many domains you can add depends on your plan: 1 on Free 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 Name and Value shown, add the record at your DNS provider and click Verify DNS now.
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 main domain, or a separate setup for a sister brand? Add the same main domain again with a different tagging subdomain. Each setup is fully independent and counts toward 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 web container ID in the GTM client container ID field (GTM-XXXXXXX). You get the Enhanced script: a masked loader path with a ?mb= parameter that ad blockers and browser privacy filters don't recognize.
- Enhanced Ad Blocker Protection is on by default for new domains, and the Enhanced script carries it itself, so every follow-up request is masked too. Switching it off asks you to confirm first.
- Site on several subdomains? Keep "All sites" for one snippet everywhere. Generate a separate snippet under "For which site" for a subdomain that loads its own web container or has its own Same-Origin Tracking address.
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.
Point the Google Analytics tag at your domain
Inside your web container, the Google Analytics tag (or a legacy Google tag) needs one setting: server_container_url, set to your tagging subdomain. The web container guide shows where, and the tracking audit checks it every night.
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 Power-ups page. 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 with their full lifetime, past Safari ITP's 7-day cap on JS-set cookies (on Safari together with Same-Origin Tracking) | Master toggle + per-cookie toggles grouped by vendor, 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) + 5 independent toggles for Meta, TikTok, Pinterest, ChatGPT and LinkedIn |
| 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 | On by default for new domains. Switch it on and off on its card or its own page; the Enhanced script carries the protection, so there is nothing extra to install. Its page also shows whether masked requests are arriving |
| Same-Origin Tracking | Serves your tagging from a path on your own website (like example.com/mb), so Safari keeps cookies for their full lifetime and there is no separate tracking hostname to block | One forwarding rule on your hosting (Vercel, Next.js, Cloudflare, Netlify, nginx, Apache, or the WordPress and Shopware plugins), then a live check on its page |
| 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 |
| Profit Tracking (POAS) | Adds the profit of every purchase to the event, so Google Ads and Meta can bid on profit instead of revenue | Cost prices from a feed, a file or your shop; switched on per account on request |
🚫 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: its status should say Working, with the time of the last masked request. If it is still waiting for the first masked request, your site isn't loading the Enhanced script yet.
All five ticked? Congratulations: your server-side tracking is up. What comes next is making sure it stays that way.
07 · The tracking audit: keeping it right
Your first hit proves the setup works today. The tracking audit keeps checking that it stays right. It runs every night for every active domain, with nothing to switch on: 40+ checks on routing, tag health, deduplication, Consent Mode, the alignment between your web and server container, and the install itself (loader, DNS and HTTPS).
- With Google Tag Manager connected, the audit also inspects your live web and server containers, and Measurebase can propose fixes and apply them into a separate workspace called "Measurebase" in your container. It never publishes: you review and publish in GTM yourself.
- The site crawl is part of every audit: a real browser visits your pages and lists every script and pixel that loads outside GTM, such as hardcoded pixels, Shopify app pixels and consent banners. Measurement hits are blocked inside that browser, so nothing reaches your analytics or shows up in your reports.
- Errors open an alert, one per domain, and so do warnings the first time they appear, through the same channels as the alerts in the next section. Want a fresh result right after a change? Queue a manual audit from the dashboard, up to five per domain per day.
Every check, and how the proposed fixes work, is in the tracking audit.
First audit clean, or its findings worked through? Then decide how you want to hear about problems.
08 · 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.
09 · 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.
10 · 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. On Safari, cookies from your tagging subdomain also last only 7 days until you serve tagging from your own domain with Same-Origin Tracking. |
| A chunk of traffic seems to vanish, especially in Firefox/Safari/Brave | An ad blocker or privacy filter is likely catching your requests. Make sure your site loads the Enhanced script and that Enhanced Ad Blocker Protection is on: its power-up page shows whether masked requests are 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 Power-ups right away. Past 24 hours, expect (and don't worry about) the alert Measurebase already opened about it. |