FAQ
Below you will find answers to our most commonly asked questions. If you cannot find the answer you are looking for, refer to the community page or Discord channel to explore additional resources.
General
Setting up Zaraz
Why is Zaraz not working?
If you are experiencing issues with Zaraz, there could be multiple reasons behind it. First, it’s important to verify that the Zaraz script is loading properly on your website.
To check if the script is loading correctly, follow these steps:
- Open your website in a web browser.
- Open your browser’s Developer Tools.
- In the Console, type
zaraz
. - If you see an error message saying
zaraz is not defined
, it means that Zaraz failed to load.
If Zaraz is not loading, please verify the following:
- The domain running Zaraz is proxied by Cloudflare.
- Auto Injection is enabled in your Zaraz Settings.
- Your website’s HTML is valid and includes
<head>
and</head>
tags. - You have at least one enabled tool configured in Zaraz.
I’m seeing some data discrepancies. Is there a way to check what data reaches Zaraz?
Can I use Zaraz with Rocket Loader?
Is Zaraz compatible with Content Security Policies (CSP)?
Does Cloudflare process my HTML, removing existing scripts and then injecting Zaraz?
Does Zaraz work with Cloudflare Page Shield?
Is there a way to prevent Zaraz from loading on specific pages, like under /wp-admin
?
How can I remove my Zaraz configuration?
Resetting your Zaraz configuration will erase all of your configuration settings, including any tools, triggers, and variables you’ve set up. This action will disable Zaraz immediately. If you want to start over with a clean slate, you can always reset your configuration.
- Log in to the Cloudflare dashboard, and select your account and domain.
- Go to Zaraz > Settings > Advanced.
- Click “Reset” and follow the instructions.
Zaraz Web API
Why would the zaraz.ecommerce()
method returns an undefined error?
How would I trigger pageviews manually on a Single Page Application (SPA)?
zaraz.spaPageview()
. Tools
Google Analytics
After moving from Google Analytics 4 to Zaraz, I can no longer see demographics data. Why?
I see two ways of anonymizing IP address information on the third-party tool Google Analytics: one in Privacy, and one in Additional fields. Which is the correct one?
There is not a correct option, as the two options available in Google Analytics (GA) do different things.
The Hide Originating IP Address option in Tool Settings prevents Zaraz from sending the IP address from a visitor to Google. This means that GA treats Zaraz’s Worker’s IP address as the visitor’s IP address. This is often close in terms of location, but it might not be.
With the Anonymize Originating IP Address available in the Add field option, Cloudflare sends the visitor’s IP address to Google as is, and passes the aip
parameter to GA. This asks GA to anonymize the data.
If I set up Event Reporting (enhanced measurements) for Google Analytics, why does Zaraz only report Page View, Session Start, and First Visit?
Can I set up custom dimensions for Google Analytics with Zaraz?
How do I attach a User Property to my events?
up.
— for example, up.name
. This will make Zaraz send the field as a User Property and not as an Event Property. How can I enable Google Consent Mode signals?
Facebook Pixel
If I set up Facebook Pixel on my Zaraz account, why am I not seeing data coming through?
Google Ads
What is the expected format for Conversion ID and Conversion Label
Conversion ID and Conversion Label are usually provided by Google Ads as a “gtag script”. Here’s an example for a $1 USD conversion:
gtag('event', 'conversion', { 'send_to': 'AW-123456789/AbC-D_efG-h12_34-567', 'value': 1.0, 'currency': 'USD' });
The Conversion ID is the first part of send_to
parameter, without the AW-
. In the above example it would be 123456789
. The Conversion Label is the second part of the send_to
parameter, therefore AbC-D_efG-h12_34-567
in the above example. When setting up your Google Ads conversions through Zaraz, take the information from the original scripts you were asked to implement.
Custom HTML
Can I use Google Tag Manager together with Zaraz?
Why should I prefer a native tool integration instead of an HTML snippet?
How can I set my Custom HTML to be injected just once in my Single Page App (SPA) website?
Other tools
What if I want to use a tool that is not supported by Zaraz?
I cannot get a tool to load when the website is loaded. Do I have to add code to my website?
Pageview
trigger. Some tools, like Google Analytics, automatically add a Pageview
action that uses this trigger. With other tools, you will need to add it manually. Refer to Get started for more information.