{"id":2442,"date":"2024-12-05T20:22:21","date_gmt":"2024-12-05T20:22:21","guid":{"rendered":"https:\/\/meetanshi.com\/blog\/how-to-setup-google-analytics-with-cloudflare-zaraz-2025\/"},"modified":"2025-12-09T19:00:48","modified_gmt":"2025-12-09T13:30:48","slug":"setup-google-analytics-with-cloudflare-zaraz","status":"publish","type":"post","link":"https:\/\/meetanshi.com\/blog\/setup-google-analytics-with-cloudflare-zaraz\/","title":{"rendered":"How to Setup Google Analytics with Cloudflare Zaraz [2026]"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/www.cloudflare.com\/\" target=\"_blank\" rel=\"noreferrer noopener\">Cloudflare<\/a>&nbsp;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&nbsp;to setup Google Analytics with Cloudflare Zaraz.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Benefits of Using Cloudflare<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">he main benefits of using Cloudflare are as follows:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>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.<\/li>\n\n\n\n<li>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\u2019s network.<\/li>\n\n\n\n<li>Helps to create new applications or improve existing ones on a serverless platform without affecting the infrastructure.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Cloudflare Zaraz<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/developers.cloudflare.com\/zaraz\/\" target=\"_blank\" rel=\"noreferrer noopener\">Cloudflare Zaraz<\/a>&nbsp;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.&nbsp; This network allows loading tools like analytics tools, marketing automation tools, chatbots, and much more.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">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.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Cloudflare acquired Zaraz with an aim to make the web more secure, reliable, and faster enough.&nbsp; This content delivery network has pledged to speed up the website performance using a single line of code.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Almost all the websites rely on third-party integrations like Ads tracking pixels, Google Analytics,&nbsp;<a href=\"https:\/\/meetanshi.com\/magento-2-facebook-pixel.html\" target=\"_blank\" rel=\"noreferrer noopener\">Facebook<\/a>, 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!<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">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.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Setup Google Analytics With Cloudflare Zaraz<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">To setup Google Analytics with Cloudflare Zaraz, you simply need to follow these steps:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Step 1:&nbsp;<\/strong>Log into Cloudflare.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Step 2:&nbsp;<\/strong>In the left-hand-side panel, find and click on&nbsp;<strong>Zaraz&gt;Tools<\/strong>&nbsp;and click on&nbsp;<strong>Add New Tool<\/strong>&nbsp;under the&nbsp;<strong>Third-Party Tools<\/strong>.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2022\/01\/Annotation-on-2022-10-10-at-16-30-48-768x413-1.png\" alt=\"2_Google Analytics With Cloudflare Zaraz\" class=\"wp-image-50036\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Step 3:<\/strong>&nbsp;Now, under the&nbsp;<strong>All Tools<\/strong>, select&nbsp;<strong>Google Analytics<\/strong>&nbsp;to configure it with Cloudflare Zaraz.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2022\/01\/Screenshot-at-January-18th-2022-11.10.01-am-1-768x429-1.png\" alt=\"3_Google Analytics With Cloudflare Zaraz\" class=\"wp-image-50037\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Step 4:<\/strong>&nbsp;On the Set Up Google Analytics popup, click on&nbsp;<strong>Continue<\/strong>&nbsp;to configure Google Analytics.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2022\/01\/Screenshot-at-January-18th-2022-12.20.59-pm-1-768x432-1.png\" alt=\"4_Google Analytics With Cloudflare Zaraz\" class=\"wp-image-50040\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Step 5:&nbsp;<\/strong>Now, enter the Tracking ID of your Google Analytics account and click on&nbsp;<strong>Save<\/strong>.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2022\/01\/Annotation-on-2022-01-18-at-12-21-57-1-768x429-1.png\" alt=\"5_Google Analytics With Cloudflare Zaraz\" class=\"wp-image-50041\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Step 6:&nbsp;<\/strong>By default, the&nbsp;<strong>Pageview<\/strong>&nbsp;tracking action will be there. In order to create a new action, you need to create a new trigger first.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2022\/01\/Screenshot-at-October-10th-2022-4.38.26-pm-768x421-1.png\" alt=\"6_Google Analytics With Cloudflare Zaraz\" class=\"wp-image-50044\"\/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2022\/01\/Screenshot-at-October-10th-2022-4.38.26-pm-768x421-1-1.png\" alt=\"6.1_Google Analytics With Cloudflare Zaraz\" class=\"wp-image-50045\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Step 7:&nbsp;<\/strong>To create a new trigger, click on&nbsp;<strong>\u201cTriggers\u201d&nbsp;<\/strong>under Zaraz from the sidebar.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2022\/01\/Annotation-on-2022-10-10-at-16-02-29-768x404-1.png\" alt=\"7_Google Analytics With Cloudflare Zaraz\" class=\"wp-image-50046\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Step 8:&nbsp;<\/strong>Now, under the&nbsp;<strong>Triggers<\/strong>&nbsp;section, click on the&nbsp;<strong>Create trigger<\/strong>&nbsp;button.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Step 9:&nbsp;<\/strong>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&nbsp;<strong>Page rule<\/strong>.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2022\/01\/Screenshot-at-January-18th-2022-12.41.56-pm-1-768x430-1.png\" alt=\"9_Google Analytics With Cloudflare Zaraz\" class=\"wp-image-50048\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Step 10:&nbsp;<\/strong>Choose a variable name and property as per your needs from the list provided there or from&nbsp;<a href=\"https:\/\/developers.cloudflare.com\/zaraz\/reference\/properties-reference\/\" target=\"_blank\" rel=\"noreferrer noopener\">here<\/a>. For an eg, here we have taken&nbsp;{{ system.page.url.pathname }} as a variable to track the URL path.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Step 11:&nbsp;<\/strong>After entering the match operation and match string, click on&nbsp;<strong>Save<\/strong>.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2022\/01\/Screenshot-at-January-18th-2022-12.48.00-pm-768x430-1.png\" alt=\"11_Google Analytics With Cloudflare Zaraz\" class=\"wp-image-50050\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Step 12:&nbsp;<\/strong>Now, click on the&nbsp;<strong>Tools&nbsp;<\/strong>option from the sidebar &amp; then \u201c<strong>Edit<\/strong>\u201d to create a new action.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2022\/01\/Annotation-on-2022-10-10-at-16-09-04-768x395-1.png\" alt=\"12_Google Analytics With Cloudflare Zaraz\" class=\"wp-image-50052\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Step 13:&nbsp;<\/strong>Under the&nbsp;<strong>Tool actions<\/strong>&nbsp;section, click on the&nbsp;<strong>Create action<\/strong>&nbsp;button.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Step 14:&nbsp;<\/strong>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&nbsp;<strong>Save<\/strong>.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2022\/01\/Screenshot-at-October-10th-2022-4.23.22-pm-768x415-1.png\" alt=\"14_Google Analytics With Cloudflare Zaraz\" class=\"wp-image-50056\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Step 15:&nbsp;<\/strong>Now, you can find Google Analytics fully functional and get real-time data in google analytics set-up using Cloudflare Zaraz.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2022\/01\/Screenshot-at-January-18th-2022-12.56.58-pm-768x420-1.png\" alt=\"15_Google Analytics With Cloudflare Zaraz\" class=\"wp-image-50058\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Step 16:&nbsp;<\/strong>You can also track the events that have fired the trigger under the events section.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2022\/01\/Screenshot-at-January-18th-2022-12.58.59-pm-768x279-1.png\" alt=\"16_Google Analytics With Cloudflare Zaraz\" class=\"wp-image-50065\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Step 17:&nbsp;<\/strong>That\u2019s it! Now, you have successfully set up Google Analytics with Cloudflare Zaraz.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><div class=\"meetanshi-cta\">\r\n<div class=\"cta-content-wrapper\">\r\n<span>Magento 2 Google Analytics 4<\/span>\r\n<p>Get actionable analytics to level-up your Magento 2 store for performance.<\/p>\r\n<a href=\"https:\/\/meetanshi.com\/magento-2-google-analytics-4.html\" target=\"_blank\" class=\"btn-primary\">Get Now <\/a>\r\n<\/div>\r\n<div class=\"cta-image-new\">\r\n<img decoding=\"async\" src=\"https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2025\/11\/ga4.png\" alt=\"Magento 2 Google Analytics 4 (GA4)\">\r\n<\/div>\r\n<\/div><\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Setup Google Analytics 4 With Cloudflare Zaraz<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">You can use the following steps to setup Google Analytics 4 with Cloudflare Zaraz:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Step 1:&nbsp;<\/strong>Log into Cloudflare.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Step 2:<\/strong>&nbsp;In the left-side panel, find and click on&nbsp;<strong>Zaraz&gt;Tools<\/strong>&nbsp;and click on&nbsp;<strong>Add New Tool<\/strong>&nbsp;under the&nbsp;<strong>Third-Party Tools<\/strong>..<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2022\/01\/Annotation-on-2022-10-10-at-16-30-48-768x413-1-1.png\" alt=\"2_Setup Google Analytics 4 With Cloudflare Zaraz\" class=\"wp-image-50071\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Step 3:&nbsp;<\/strong>Now, under the&nbsp;<strong>All Tools<\/strong>, select&nbsp;<strong>Google Analytics 4<\/strong>&nbsp;to configure it with Cloudflare Zaraz.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2022\/01\/Screenshot-at-January-18th-2022-11.10.01-am-2-768x429-1.png\" alt=\"3_Setup Google Analytics 4 With Cloudflare Zaraz\" class=\"wp-image-50074\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Step 4:&nbsp;<\/strong>After selecting Google Analytics 4, enter the Measurement ID and then click on the&nbsp;<strong>Save<\/strong>&nbsp;button.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2022\/01\/Screenshot-at-January-18th-2022-2.00.06-pm-768x430-1.png\" alt=\"4_Setup Google Analytics 4 With Cloudflare Zaraz\" class=\"wp-image-50078\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Now, after that follow the&nbsp;same steps&nbsp;that we mentioned above to set up Google Analytics 4 with Cloudflare Zaraz.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">That\u2019s it.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Do consider sharing this post with your friends via social media.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Thank You.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Cloudflare&nbsp;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&#8230;<\/p>\n","protected":false},"author":7,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[112,78],"tags":[],"class_list":["post-2442","post","type-post","status-publish","format-standard","hentry","category-e-commerce","category-digital-marketing"],"acf":[],"_links":{"self":[{"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/posts\/2442","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/users\/7"}],"replies":[{"embeddable":true,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/comments?post=2442"}],"version-history":[{"count":5,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/posts\/2442\/revisions"}],"predecessor-version":[{"id":24723,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/posts\/2442\/revisions\/24723"}],"wp:attachment":[{"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/media?parent=2442"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/categories?post=2442"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/tags?post=2442"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}