managed-components / google-analytics-4

Google Analytics 4 Managed Component
Other
19 stars 7 forks source link

Cloudflare Zaraz beta ignoring blocking triggers #10

Closed CFranklinEvo closed 1 year ago

CFranklinEvo commented 1 year ago

Hi @bjesus ,

We have a few sites set up in Cloudflare Zaraz with essentially the same blocking triggers based on cookie values. The configuration is the same across the board for multiple working sites and I have simplified the failing config down to just using GA4, no e-commerce, just PageView events, etc. and we're still seeing all of the GA4 cookies load despite the service being blocked.

Blocking Trigger used: Match rule, Cookie: cookie_analytics, Not matches regex, [1] Expected outcome: GA4 cookies are not loaded unless cookie_analytics is set and equals '1' Actual outcome: GA4 cookies load before __cf_bm cookie

The only difference that we've been able to see between the domains configured in Cloudflare is that the broken one has Zaraz flagged as a beta version. The working domains do not have the beta flag.

aran112000 commented 1 year ago

Also seeing the same issue here

bjesus commented 1 year ago

Thanks, we can reproduce. In terms of this component, @simonabadoiu will make sure we only attach client-side events upon a pageview, which should fix this problem.

aran112000 commented 1 year ago

It seems this issue only affects GA4 implementations, all other tags appear to correctly respect the Blocking Triggers setup within Zaraz. Is there an ETA on when a fix for this will be ready as it's causing tracking prior to consent being received currently?

bjesus commented 1 year ago

We are working on getting the fixed released before the end of the week.

aran112000 commented 1 year ago

Amazing, thank you

bjesus commented 1 year ago

Issue should be fixed

CFranklinEvo commented 1 year ago

Can confirm that's fixed the issue. Thanks a lot <3