Analytics with Cloudflare Zaraz: One Tool, Maximum Performance
By using Cloudflare Zaraz, you can replace multiple analytics tools with a single tool. It simplifies cookie consent management while boosting performance.
As we developed our web and mobile game project, we realized the need for an analytics tool. Initially, we started with Google Analytics, but later required Facebook Pixel. As we needed more analytics tools, we wondered if we could solve this with a single tool and discovered that Cloudflare Zaraz could do the job. Let's first understand what Cloudflare Zaraz is.
What is Cloudflare Zaraz?
"Zaraz increases web application speed, security, and privacy by loading third-party tools in the cloud, away from browsers. Load analytics tools, advertising pixels, widgets, and other third-party tools without slowing down your applications." This is how it is described on its official website. Let's break down this description.
"Zaraz increases web application speed, security, and privacy by loading third-party tools in the cloud, away from browsers." This means we send our analytics data only to Cloudflare Zaraz, and it sends the data to third-party tools on our behalf. This way, we leverage Cloudflare's technology for data security, privacy, and speed. Now, let's see why this speed and security are important.
Why Cloudflare Zaraz?
Compatible with AdBlockers
In traditional methods, when you add multiple tools to your web application, many of them do not work with adblockers. This is because adblockers automatically block these tools. However, with Cloudflare, since you are fetching these paths through your own domain, you have the chance to bypass this issue.
Performance
When you add multiple tools to your web application using traditional methods, each of these tools sends separate requests, which decreases your web application's performance. With Cloudflare Zaraz, you send only one request, and Cloudflare forwards this request to third-party tools. When you send the same event to multiple tools, the performance loss is significantly higher. You only send to Cloudflare, and then you can easily direct which event should go where from the Cloudflare panel.
Cookie Consent Management
If you are launching a website in the European Union, you need to manage cookie consent. This requires many tools. With Cloudflare Zaraz, you only need to manage one cookie consent. This improves both user experience and performance. You can request consent for each tool separately if you wish. The downside is that the styling is quite standard and can be difficult to customize.
You can easily adjust the settings you need through the Consent menu in the panel. This way, you comply with both European regulations and Google Analytics' cookie consent requirements.
Usage
Once you set up through the Cloudflare panel, it automatically becomes active on your site if you use Cloudflare DNS. No extra setup is needed.
If you want to send events yourself, you can use the zaraz.track
function. For example:
zaraz.track("event", "eventName", {
eventProperty1: "eventValue1",
eventProperty2: "eventValue2",
});
Then you need to define a trigger from the panel. You should define it as Create Trigger -> Event -> eventName. After defining the trigger, you select which tool to send it to, create an action, name it, and in the firing trigger part, select which trigger should activate it. Choose the event from below and save.
If you were using gtag before, you can continue without making any changes here. Just enable it from the settings.
Additionally, if you want to define a user, you can use the zaraz.set
function. For example:
zaraz.set("userId", "12345");
Furthermore, if you run an e-commerce site, you can use the zaraz.ecommerce
function. For example:
zaraz.ecommerce("purchase", {
transaction_id: "12345",
value: 100,
currency: "USD",
});
The difference here is that this data is automatically sent to Google Analytics without you needing to do anything. For others, you need to define a trigger.
In summary, you first define the tag as a trigger and then send it to the desired tool with an action.
To see what data is transferred from the tags you defined, you can check the monitoring section in the panel. Here, you can see data for the last 72 hours. Unfortunately, this section only counts analytics data and does not offer much extra functionality.
Conclusion
Cloudflare Zaraz provides great convenience by allowing you to manage all the analytics tools needed for your web and mobile game projects from a single platform. By managing third-party tools in the cloud, it offers significant advantages in terms of performance and security. Being compatible with adblockers, minimizing performance loss, and offering easy-to-manage cookie consent are among the features that make Zaraz appealing.
The flexibility provided by Zaraz allows you to process analytics data quickly and securely and easily integrate with different tools. Especially, being able to manage cookie consent in compliance with European regulations facilitates meeting the legal requirements of your game project.
The simplicity of installation and ease of use are significant reasons to choose Zaraz. With zaraz.track
, zaraz.set
, and zaraz.ecommerce
functions, you can effortlessly track custom events, define users, and monitor e-commerce transactions, sending the data to relevant tools.
In summary, Cloudflare Zaraz stands out as a powerful tool to meet the analysis and performance needs of your game project. With all these features, it improves both user experience and ease of development. By using Zaraz, you can make your analysis processes more efficient and increase the success of your game project.