How To

Cloudflare Zaraz vs Google Tag Manager: adding Google Analytics 4 to Webflow

Preferred source on google logo
Cloudflare Zaraz vs Google Tag Manager: adding Google Analytics 4 to Webflow
March 16, 2023

  · 9 min

What Cloudflare Zaraz is, how it compares to Google Tag Manager, what it costs, and how to set it up on Webflow with Google Analytics 4, plus answers to common Zaraz questions.

Cloudflare's Zaraz Tag Manager is a free and powerful tool that helps website owners manage and deploy various tracking scripts and third-party tags on their sites. We’ve been promising to do a post and video on Zaraz since we did our post on optimising your Webflow site with Cloudflare and how to get it running properly, so here it is. We'll also explore how Zaraz can help improve your website's speed and performance and how that works.

What is Cloudflare's Zaraz Tag Manager?

Zaraz is a tool that allows website owners to manage their website's tags in a single place. It offers a range of features (tag monitoring, and by most accounts tag sequencing and tag bundling too) that make it easy to manage and deploy multiple tags on your site.

One of the biggest advantages of Zaraz is its simplicity. It offers a user-friendly interface that makes it easy to add, modify, and remove tags from your website. Plus, it's free to use (every Cloudflare account gets 1,000,000 Zaraz Events a month, and after that it's $5 per month for each additional 1,000,000), which makes it an attractive option for small businesses and startups.

But, the most important benefit is the speed it offers when compared to tools like Google Tag Manager, when used in conjunction with a proper Cloudflare optimisation setup for your site. Adding tags to your website can have a significant impact on its speed and performance. Zaraz can help improve your website's speed in the following ways:

  1. Tag bundling: as we understand it, Zaraz can bundle tags together to reduce the number of HTTP requests required to load your site, which can significantly improve page load times.
  2. Lazy loading: Zaraz is also said to offer lazy loading, which means that tags are only loaded when they're needed, reducing the initial page load time and improving the perceived speed of your website.
  3. Asynchronous loading: Another way that Zaraz can help improve website speed is by using asynchronous loading. This means that tags are loaded in the background, which can reduce the impact on page load times by not creating bottlenecks.
  4. Fast and reliable infrastructure: Finally, Zaraz is built on Cloudflare's fast and reliable infrastructure, with data centres around the world. This means that your tags are served quickly and reliably, which can further improve your website's speed and performance.
  5. Server-side tagging: Instead of installing third-party tools directly onto your website, this tool manager loads them in the cloud, away from the browser.

Cloudflare's Zaraz Tag Manager vs Google Tag Manager

Google Tag Manager (GTM) is another popular tool for managing tags on your website. While both tools are great, there are some differences worth considering.

Google Tag Manager is free to use, but it requires a Google account, and yes, there are folks who don't like that. Cloudflare's Zaraz Tag Manager, on the other hand, is free for the first 1,000,000 Zaraz Events a month and doesn't require any additional accounts aside from your Cloudflare account.

Another difference between the two tools is their level of complexity. Google Tag Manager is a more advanced tool that offers a range of features, including advanced tag sequencing, tag templates, and more. Cloudflare's Zaraz Tag Manager, on the other hand, is simpler and more straightforward, which makes it a better choice for beginners. That's not to say you can't do complex event tracking etc., simply that doing the basics can be a lot easier, while more advanced tracking can be a little harder.

Finally, there's the speed factor we talked about above. If you have a lot of tags set up in Google Tag Manager, you’ll see that Google complains more about its own tools and Tag Manager in your page speed results, whereas Zaraz will usually give much better test results.

Implementing Cloudflare's Zaraz Tag Manager

Implementing Cloudflare's Zaraz Tag Manager on your website is a simple process that involves the following steps:

  1. Sign up for a Cloudflare account: To use Zaraz, you need to sign up for a Cloudflare account. Simply visit the Cloudflare website, create an account, and follow the instructions to verify your domain.
  2. Add your site to Cloudflare: Once you've signed up for a Cloudflare account, you can add your website (domain) to it. This will allow you to manage your website's tags in a single place. To use Cloudflare for your Webflow DNS settings, follow the Webflow Cloudflare guide. If you’d like Cloudflare to cache and optimise your Webflow site, scratch the Webflow guide and follow the instructions in our post on using Webflow with Cloudflare to cache and speed up your project. (That post is from 2022. The current approach is in our 2026 guide to the Cloudflare asset proxy and optimisation.)
  3. Set up Cloudflare's Zaraz Tag Manager: Once you've added your site to Cloudflare, you can set up Cloudflare's Zaraz Tag Manager. Simply navigate to the "Zaraz" tab (in the Cloudflare dashboard today it sits under Tag setup) and follow the instructions to set up your tags.
Zaraz in the Cloudflare dashboard
Zaraz in the Cloudflare dashboard

4. Add your tags: Finally, you can add your tags to Cloudflare's Zaraz Tag Manager. Simply click "Add new tool" and follow the instructions to add your tags. Aside from adding custom scripts, here’s the full list of current out-of-the-box tools you can implement immediately by mostly pasting in a tracking ID or account ID. If you need to add something not currently on the list you can usually add them with either Custom HTML, Custom Image for pixels or HTTP Request.

Add a new tool in Cloudflare Zaraz
Add a new tool in Cloudflare Zaraz

How to add Google Analytics 4 to Cloudflare's Zaraz

Adding Google Analytics 4 to Cloudflare's Zaraz is a straightforward process that involves the following steps, which we’re just going to run through to show you how easy it is to add most of the out-of-the-box tools in Zaraz:

  1. Create a new Google Analytics 4 property: To get started, you'll need to create a new Google Analytics 4 property. Simply navigate to the Google Analytics website, create a new property, and follow the instructions to set it up. We have a guide on adding Google Analytics to Webflow using Tag Manager.
  2. Get your Google Analytics 4 measurement ID: Once you've created a new property, you'll need to get your Google Analytics 4 measurement ID. This is a unique ID that identifies your property and allows you to track your website's traffic.
  3. Add your Google Analytics 4 tag to Cloudflare's Zaraz: Once you have your measurement ID, you can add your Google Analytics 4 tag to Cloudflare's Zaraz. Simply click "Add new tool" in Zaraz and select "Google Analytics 4" as the tag type.

Tick the boxes and click Continue to allow permissions.

Google Analytics 4 in Cloudflare Zaraz
Google Analytics 4 in Cloudflare Zaraz

Enter your measurement ID and hit save.

GA4 measurement ID in Zaraz
GA4 measurement ID in Zaraz

A pageview will be added automatically and you’re done.

Google Analytics 4 Trigger in Zaraz
Google Analytics 4 Trigger in Zaraz

That's pretty much that. Most tools, like Google Ads etc., follow a similar template. The reason we like it so much at Milk Moon Studio is twofold: one, the simplicity. We're a small Webflow studio, so we love no-code or at least low-code Webflow design, which makes this perfect for us. Secondly, the speed boost we get when we run a client on Zaraz and the rest of their project is also cached on Cloudflare and optimised by it on the fly. It's what this very site runs its Google Analytics 4 through, too.

Cloudflare's Zaraz Tag Manager is a valuable tool that can help you better manage your website's tags and improve its performance. By taking advantage of its various features, you can streamline your website's operations, improve the user experience, and boost your website's visibility and engagement.

Implementing Zaraz is a simple process that involves signing up for a Cloudflare account, adding your site to Cloudflare, setting up Cloudflare's Zaraz Tag Manager, and adding your tags.

Cloudflare Zaraz questions people ask

Is Cloudflare Zaraz free?

Yes, up to a point. Every Cloudflare account gets 1,000,000 free Zaraz Events a month (a page view or a zaraz.track call each counts as one event), and after that the Zaraz Paid plan costs $5 per month for each additional 1,000,000. If you go over without enabling Zaraz Paid, Zaraz switches off until the next billing cycle, so keep an eye on the Monitoring page. Cloudflare will also email you at 50%, 80% and 90% of your allowance.

Is Zaraz better than Google Tag Manager?

For most Webflow sites that mainly need Google Analytics 4 and a few pixels, we think so: setup is simpler, it doesn't need a Google account, and the tags load from Cloudflare's edge instead of in the browser, so your page speed results usually look better. Google Tag Manager still wins when you need its deeper templates, advanced sequencing and a huge library of community tags. We use both, and we cover the Tag Manager side in why you should use Google Tag Manager in Webflow and in our post on delaying Tag Manager tags for better page speed.

Can I use Zaraz with WordPress or other platforms?

Yes. Zaraz isn't tied to Webflow. It works on any site that Cloudflare sits in front of, WordPress included, because the tools are loaded at Cloudflare rather than by your CMS. Cloudflare recommends proxying your site through Cloudflare before using Zaraz, though it also has a way to use Zaraz on domains that aren't proxied.

How do I add Google Analytics 4 to Zaraz?

Head to Zaraz in your Cloudflare dashboard, hit Add new tool, pick Google Analytics 4, paste in your measurement ID and save. A pageview action is added automatically, so you're tracking straight away. The steps above show every screen.

Does Zaraz handle cookie consent?

It has a built-in consent management tool, so you can hold tags back until a visitor agrees. Just be aware of what consent banners do to your numbers, which we dig into in our post on the cookie consent dilemma and the data that vanishes.

We’ve been meaning to do a video on the whole process, so watch this space. In the meantime, drop us a comment if you have any questions. For those of you who’d like to do more with Cloudflare, head to this post to see how to get it working with Webflow and how to get your content cached and optimised. We also have a whole post on adding Google Tag Manager and Google Analytics to Webflow, and a few posts on tracking clicks and form submits etc in the how-to section, so check them out. If you’re after more on measurement, the analytics projects and posts are worth a look too.

Preferred source on google logo

Share

All Posts

Gradient Background