How to Setup Google Analytics with Cloudflare Zaraz [2026]

Cloudflare is one of the largest networks operating on the internet. It is a global network specially designed to easily connect everything on the internet more securely, quickly and reliable. The main purpose behind using Cloudflare is to increase the security and performance of your websites and services. Here, we have prepared a detailed guide to setup Google Analytics with Cloudflare Zaraz.

Benefits of Using Cloudflare

he main benefits of using Cloudflare are as follows:

  • Facilitates to easily protect, secure, and accelerate your apps, websites in just minutes by pointing your DNS to Cloudflare. Having secure and fast web applications leads to having a better user experience.
  • Allows to securing internal operations on a single global network. It is possible to protect the office networks and data centers by easily connecting them to Cloudflare’s network.
  • Helps to create new applications or improve existing ones on a serverless platform without affecting the infrastructure.

Cloudflare Zaraz

Cloudflare Zaraz allows you to completely control over third-party tools and services for your website. It also helps in improving the speed and security of your website.  This network allows loading tools like analytics tools, marketing automation tools, chatbots, and much more.

This biggest global network, Cloudflare Zaraz, is available in Beta with a website integrated with Cloudflare. It is easily accessible to all the customers on each and every plan. Hence, the main benefit of using Cloudflare Zaraz is to integrating as many tools you need with almost zero performance ensuring high speed and advanced security.

Cloudflare acquired Zaraz with an aim to make the web more secure, reliable, and faster enough.  This content delivery network has pledged to speed up the website performance using a single line of code.

Almost all the websites rely on third-party integrations like Ads tracking pixels, Google Analytics, Facebook, HubSpot for gathering crucial information about the visitors. These third-party tools affect the performance of your website and would show a huge impact, the longer script the company adds to its codebase. Here, Zaraz comes into the picture!

It is possible to run as many tools as you need using Zaraz with making any compromise in security or affecting the site speed. Thus, Zaraz helps to prevent site security from entering malicious code and prevents from running third-party tools on the browser.

Setup Google Analytics With Cloudflare Zaraz

To setup Google Analytics with Cloudflare Zaraz, you simply need to follow these steps:

Step 1: Log into Cloudflare.

Step 2: In the left-hand-side panel, find and click on Zaraz>Tools and click on Add New Tool under the Third-Party Tools.

2_Google Analytics With Cloudflare Zaraz

Step 3: Now, under the All Tools, select Google Analytics to configure it with Cloudflare Zaraz.

3_Google Analytics With Cloudflare Zaraz

Step 4: On the Set Up Google Analytics popup, click on Continue to configure Google Analytics.

4_Google Analytics With Cloudflare Zaraz

Step 5: Now, enter the Tracking ID of your Google Analytics account and click on Save.

5_Google Analytics With Cloudflare Zaraz

Step 6: By default, the Pageview tracking action will be there. In order to create a new action, you need to create a new trigger first.

6_Google Analytics With Cloudflare Zaraz
6.1_Google Analytics With Cloudflare Zaraz

Step 7: To create a new trigger, click on “Triggers” under Zaraz from the sidebar.

7_Google Analytics With Cloudflare Zaraz

Step 8: Now, under the Triggers section, click on the Create trigger button.

Step 9: Enter the trigger name as per your convenience and set the match rules. You can choose the match rules as per your requirements. For an instance, here we have selected Page rule.

9_Google Analytics With Cloudflare Zaraz

Step 10: Choose a variable name and property as per your needs from the list provided there or from here. For an eg, here we have taken {{ system.page.url.pathname }} as a variable to track the URL path. 

Step 11: After entering the match operation and match string, click on Save.

11_Google Analytics With Cloudflare Zaraz

Step 12: Now, click on the Tools option from the sidebar & then “Edit” to create a new action.

12_Google Analytics With Cloudflare Zaraz

Step 13: Under the Tool actions section, click on the Create action button.

Step 14: Now, enter your action name, select the firing trigger that we have created previously, select the event type, enter event action, category, label, and click on Save.

14_Google Analytics With Cloudflare Zaraz

Step 15: Now, you can find Google Analytics fully functional and get real-time data in google analytics set-up using Cloudflare Zaraz.

15_Google Analytics With Cloudflare Zaraz

Step 16: You can also track the events that have fired the trigger under the events section.

16_Google Analytics With Cloudflare Zaraz

Step 17: That’s it! Now, you have successfully set up Google Analytics with Cloudflare Zaraz.

Magento 2 Google Analytics 4

Get actionable analytics to level-up your Magento 2 store for performance.

Get Now
Magento 2 Google Analytics 4 (GA4)

Setup Google Analytics 4 With Cloudflare Zaraz

You can use the following steps to setup Google Analytics 4 with Cloudflare Zaraz:

Step 1: Log into Cloudflare.

Step 2: In the left-side panel, find and click on Zaraz>Tools and click on Add New Tool under the Third-Party Tools..

2_Setup Google Analytics 4 With Cloudflare Zaraz

Step 3: Now, under the All Tools, select Google Analytics 4 to configure it with Cloudflare Zaraz.

3_Setup Google Analytics 4 With Cloudflare Zaraz

Step 4: After selecting Google Analytics 4, enter the Measurement ID and then click on the Save button.

4_Setup Google Analytics 4 With Cloudflare Zaraz

Now, after that follow the same steps that we mentioned above to set up Google Analytics 4 with Cloudflare Zaraz.

That’s it.

Do consider sharing this post with your friends via social media.

Thank You.

Shivbhadrasinh Gohil

Article by

Shivbhadrasinh Gohil

Shivbhadrasinh is the Co-founder & Chief Marketing Officer at Meetanshi. He leads the marketing team and is the person behind the marketing & branding success of the company. Being a seasoned digital marketer, he has been consulting online businesses for growth since 2010 and has helped 100+ clients with digital marketing success. He loves sharing...