Ad blockers: custom loader works, but event script is still blocked

Hi,

I was testing script firing with Ad Blocker enabled and what I have found is that the GTM script isn’t being blocked, because it’s created with a custom loader, however, the event script created with GA4 Tag to send events to server is not even loading.

Here’s the scenario with ad blocker disabled:

One other thing I noticed is that even if GTM script created with custom loader isn’t blocked, the event script created with GA4 tag still is! While the event script created with Data tag isn’t.

Ad blocker disabled:
e64bee1e-5322-4cad-877e-daa0690c4ceb
The yellow colored requests are events firing.

Now here’s the scenario with ad blocker enabled:
b2bb5dbc-1a73-4773-b9cc-c61dd9d08b6f
No event scripts are loaded, which causes events not showing up in the server.

I also tested an event script created with Data Tag, and this one is fired as it’s seen in both pictures.

But there are some limitations of Data Tag regarding GA4, like correctly recording session_id, user_engagemet, first_visit events, etc.

Do you have any recommendations for this issue?

The Ad blocker I’m using is uBlock

Thanks!

This is something new to uBlock.
Can you share your uBlock settings?
We will check what we can do.

It’s default, with no additional settings.

image

I was thinking of using Data Tag for everything and try to manually reconstruct the page_engagement, first_visit, and session_start metrics in GA4.

I am also thinking about “cypting” al the event names and other info. So for example I’d use my own naming convention for page_view event like “xvb124”, and then “decrypting” it the server container.

Just in case if ad blockers become even more aware and start looking into request parameters.

But maybe that’s something it can be automatically done in Data Tag and Data Client?

But then my question about the GA4 metrics still remain.

Maybe we can try to aproximate what GA4 is doing and sending our own events. For example storing session info in local storage and sending own session_id. Recreating user_engagement metric and its parameters, etc.

Looking forward for any updates on this.

Thanks!
Gašper

Hi, @Denis,

are there any updates on this? I am now using Data tag for advertising conversions, so there are more conversions recorded, and GA4 tag for GA4 analytics so it has the right session data. But would love to bo only using one tag to capture an event :slight_smile:

Actually yes. we have update.

Data Tag will be not ideal solution for GA4.
And we need to think how to manage GA4 work for uBlock.

Problem is we can’t at this moment find solution as this time uBlock disable API that needed for GA4.
We really hope that we will find solution but our current tests show that if Google will not add support of disabling this API there will be no way to bypass this.


Thanks for the update! So, I’m sticking with my plan to use Data Tag for conversions only and GA4 tag for GA4.

@Gasper_Cerar Try now ga4 with your favorite adblocker :wink:

Magic! :magic_wand: :smiley:

How did you do it?

stape magic, like you said yourself

Kudos! Doing great guys!

1 Like

Hi, @Dan,

recent uBlock update is blocking the GTM script again:
image

I am using Stape GTM Server Side plugin to generate the script.

Hope there is a way to bypass it again :slight_smile:

Hey @Gasper_Cerar thanks for flagging this.

AdBlockers are and always will be an uphill battle. This is in our backlog, we’ll see what can be done

Thanks, Dan.

I am looking forward to your feedback.

Any ETA on a resolution to this issue? I’ve been championing stape internally and I’m incredibly appreciative of all the support and capability provided, just keen to be in front of this problem before it is noticed more widely.

I ask also knowing that this is a situation very difficult to be pro-active about given the constant changes in browsers and ad-blockers.

Hey Ross,
The updated custom loader will be available on all zones within the next few weeks.

Any updates on this, and will I need to update the custom loader script or is the update going to allow me to leave the one already implemented in place? My Client takes forever to update their website with our change requests, so if there’s any way to keep the current custom loader working, that’d be great.

@gen_analytics the new loader is available in your Stape account, yes, it needs to be replaced on customer’s website.

Hi Dan,

Thank you, I didn’t have “Data Tag” added but once I added that to Web GTM and sGTM, I started to see the “page_view” with uBlock Origin on.

Only issue now is I don’t see any events. For example, I have “linkClick” as a GA4 event, but this isn’t being detected by the dataLayer. If I turn off uBlock Origin, linkClick is detected by the dataLayer and Web GTM fires the tag, which is then detected by sGTM.

page_view detects with uBlock Origin on or off, it’s only GA4 events that are not.

Hi @gen_analytics

To modify GA4 pattern for which events are blocked you need to completely redefine the GA4 request pattern, which let’s say is not very safe and can affect other scripts. We are in the process of developing such a solution, it will take at least 1-2 months and it will work optionally as potentially activation of this may affect other scripts or site functionality.

Now custom loader fully protects container loading and Data tag operation.

2 Likes