Cloudflare Zaraz versus GTM clientside: the test results.
First published 13 March 2023. Restored 1 November 2026; the numbers and screens are from then.
One thing to know before you read on: this test ran in March 2023 on a near-empty homepage, with the Zaraz, Google Tag Manager and Google Analytics of that moment. All of those tools have changed since. Read the numbers as a snapshot of that day.
This note puts Cloudflare’s Zaraz next to a clientside Google Analytics setup through Google Tag Manager (GTM). We looked at two things: how fast the page loads, and how accurately Google Analytics places a visitor on the map.
The occasion was practical. We were revamping Great Results Online, and a new version of the website came with it. We wanted to install analytics that day, and to share what we saw right away. The decision is at the end, and it may come as a surprise.
The comparison was also a first step toward some bigger questions we had at the time:
- how to comply with privacy rules in the EU, and so worldwide (GDPR and Schrems II)
- the sunsetting of Universal Analytics (Google Analytics 3) on 1 July 2023
- what a serverside or cloud-hosted analytics setup brings
- how to prepare for what comes next in data and analytics
Two caveats from the original post:
I have not peer-reviewed these findings yet. I will share them on the Zaraz community forum and Twitter after publishing and ask for feedback.
I am also a bit cautious about the online speed tools. Several runs on the same day, same settings, same tools, gave very different results for the first few tests. I will repeat the tests on other days to compare more comprehensively.
What is Cloudflare Zaraz, and what could it bring?
If you know Cloudflare, you know they make websites faster and more secure. In short, they sit in front of your site as a proxy: every request passes through them and gets filtered before it reaches your server. Their Web Application Firewall is the outer wall, filtering out known attacks on your site.
Zaraz is one of the many other services Cloudflare offers. With Zaraz, third-party scripts like Google Analytics and the Facebook Pixel run on Cloudflare’s infrastructure instead of being embedded in your page. That makes them load faster and more securely.
Those scripts also run in a first-party context: they appear as part of your own domain and set cookies as if they came from your site, instead of being seen as third-party cookies.
The potential benefits of serverside tracking, as we listed them then:
- more control over your data (privacy, first party, GDPR)
- faster loading, because third-party scripts are offloaded
- better security (spammers cannot track your data processing)
And two extra reasons to pick Zaraz over GTM serverside:
- low cost: no expensive Google Cloud instance to spin up and no third party to hire for it
- a more user-friendly initial setup
How did we test Zaraz against GTM clientside?
The test page was the homepage of greatresults.online. Two things had to be right:
- The page loads as fast as possible, so you do not have to wait.
- Visitors show up in the right place in Google Analytics, so we can see where you are reading from.
The homepage was clean at that point (empty, really): two published articles and no images. The domain was already proxied through Cloudflare DNS and hosted on a server in Singapore.
The steps:
- Created both a Google Analytics 4 (GA4) and a Universal Analytics (UA) property.
- For GTM clientside we used Thomas Geiger’s GTM4WP plugin, switched off inside the plugin while testing Zaraz.
- Three tools measured the page loads: Lighthouse from Chrome Incognito, GTmetrix with the location set to London, and Pingdom Tools with the location set to London.
- Several test runs came before the last three that made it into the results table.
- The cache was cleared at every step and every test, and the Chrome Incognito window was re-opened for every Lighthouse test.
Why that last one? From the original post:
I did this for two reasons. I did not make similar screenshots and wanted to redo the tests. And I noticed a big difference in load times, which normalised after several tries. For instance, caching and switching from a setup with Zaraz to a setup with GTM clientside: did the caching and test results bleed into each other? Hence my ambition to do the same tests again, spread over several days.
What did the tests show?
GTmetrix with Zaraz



GTmetrix with GTM clientside



Pingdom Tools with Zaraz



Pingdom Tools with GTM clientside



Lighthouse with Zaraz
The Lighthouse reports for desktop runs 2, 3 and 4 were saved as PDFs and are not included here. The Lighthouse figures of the last three runs are in the table below.
Lighthouse with GTM clientside
The Lighthouse reports for desktop runs 1, 2 and 3 were saved as PDFs and are not included here. The Lighthouse figures of the last three runs are in the table below.
Location accuracy with Zaraz


Location accuracy with GTM clientside


What did we decide, and why?

The same table in text:
| Lighthouse | GTmetrix speed (ms) | Pingdom Tools speed (ms) | Pingdom Tools grade | |
|---|---|---|---|---|
| Zaraz, test 4 (13/3) | 0.2 | 338 | 293 | 94 |
| Zaraz, test 5 (13/3) | 0.3 | 367 | 290 | 94 |
| Zaraz, test 6 (13/3) | 0.3 | 347 | 274 | 94 |
| Zaraz, average | 0.27 | 351 | 286 | 94 |
| GTM, test 4 (13/3) | 0.3 | 374 | 332 | 91 |
| GTM, test 5 (13/3) | 0.3 | 337 | 290 | 91 |
| GTM, test 6 (13/3) | 0.3 | 373 | 321 | 91 |
| GTM, average | 0.30 | 361 | 314 | 91 |
| Difference | -11.11% | -2.95% | -9.12% | 3.30% |
We did not go with Zaraz at the time, even though it was faster, safer and scored a higher performance grade.
Why? The reason is simple. The locations Google Analytics showed were in or just outside Jakarta, on a different island, almost 1,200 kilometres (750 miles) from Bali, where we live and work.
Imagine basing a market-research conclusion on that, let alone running paid ads on that discrepancy.
Even without Zaraz’s proxy server (which we believe is what causes the discrepancy), so with GTM clientside directly on the site, Universal Analytics listed Surabaya as the place we were testing from. That is ‘only’ 430 kilometres (270 miles) away.
For reference: the Netherlands, where we come from, is 200 kilometres (125 miles) wide, and the longest distance within the country is 274 kilometres (170 miles).
We will keep following Zaraz and reach out to the team to see whether anything can be done about this (or whether we tested it wrong).
The original post had two route maps here: Denpasar (Bali) to Jakarta, and Denpasar to Surabaya.