Zaraz, Google Analytics and Google Optimize not working correctly

Hi there,

So I’ve just started testing Zaraz against Google Tag Manager fro more simple setups, and while there’s definitely a speed increase it seems Google Optimize doesn’t work correctly when using Zaraz. I’ve got Universal Analytics and GA4 setup in Zaraz and Google Optimize, but the optimize experiments stopped running the moment I made the switch from Tag Manager. In Optimize it picks up that the Optimize code is present on the site, but it says GA is not installed, which it needs to work. I’m getting data through GA, but it looks like Optimise just stops running when Zara implements GA. If I have Optimise in Zaraz and turn Tag Manager back on and GA in Tag Manager it works. Has anyone been able to get bot Optimize and GA working together in Zaraz?

Hi @jakes, I’d love to help you solve this over a call. Sent you a message :slight_smile: Thanks for reporting this issue.

If using analytics 4 tool with Zaraz and Cloudflare, do I still manually put the tag script on my website as well or is the Zaraz plugin doing that for me?

I think it’s working but Google tag manager can’t find a tag on my website if I use the tag manager in chrome.

Hey mr.carn – when using Zaraz you do not need to manually put the GA4 script on your website. But Zaraz will not use the GA4 script either. With Zaraz GA4 is loaded on the cloud, so you can use Chrome Extensions to detect it. You can use the Zaraz debug instead: https://developers.cloudflare.com/zaraz/web-api/debug-mode/

I will have a look at the debugging, but I can get the legacy UA analytics plugin working ok just not the Anlytics v4 plugin. It always says “no data received” from the website but it’s all set up correctly.

Ok, it is working :slight_smile: Just needed to take 24 hours before the data started coming in, unlike the anaytics v1 which is much quicker to initialise it seems.

although the engagement data isn’t working and just says 0.00 seconds average…

So at the moment I have both Google analytics and Analytics V4 plugins running and getting data but V1 is still more accurate with the details. V4 is still not working 100% with this plugin for me.