Optimize
3.3K members online now
3.3K members online now
Everything you need to know about setting up Optimize including creating your account and container, linking to Google Analytics and how to tag your site.
Guide Me
star_border
Reply

Page loading delay with Adblocker

[ Edited ]
Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

Hi, I am noticing a significant delay in loading any web page on a small fun site of mine (log2talk.com) while browsing the pages with an AdBlocker turned on (uBlock). I wonder whether the GA + Optimize script should be blocking the rendering of the page altogether. I suggest to give it a try yourself - turn off/on the AdBlocker and see the impact it makes.

 

Suggestions?

 

Best regards

Moe

1 Expert replyverified_user

Page loading delay with Adblocker

Top Contributor
# 2
Top Contributor

This does sometimes happen, they do an update of what to block and it causes issues for analytics loading etc.

Best thing you can do is probably notify the addon devs of the issues.

Have you tried whitelisting the domain(s) the scripts load from?

Bronwyn Vourtis, Google Analytics Top Contributor
Was my response helpful? If yes, please mark it as the ‘Best Answer.’ Learn how here

Page loading delay with Adblocker

Visitor ✭ ✭ ✭
# 3
Visitor ✭ ✭ ✭

Hi, for the "basic" GA tracker there appears no extra delay despite the blocker.

However as soon as you have that ga.require('(...)optimize(...)') in there you see some nasty rendering delay. Again, it is easy to verify by just trying with uBlock running. So you would say I should let them know? I would hope there is potential to not block the rendering of the page despite of the dynamic elements associated with Optimize, similar to the basic tracking.

 

When you say whitelisting, do you mean in my browser plugin settings? Or could you please elaborate?

 

Thank you and regards

Moe

Re: Page loading delay with Adblocker

Top Contributor
# 4
Top Contributor

Just out of interest.. in both the property settings and the view setting pages

do you have the website url entered as https and have you included the www.

the website defaults to www, so the property and view information should include 

this.

 

(I dont usually use ublock)
I've completed a default installation of ublock, with the default settings.
I go to your site.. and yes there is a huge lag.
Google tag assistant shows two errors.. 
An error occurred while the tag was fired: net::ERR_BLOCKED_BY_CLIENT

I changed ublock to advanced user mode to get a better look at what might be going on

and it shows a global rule for google-analytics.com

ublock01.jpg

So.. i create a local rule to allow google-analytics.com
reload the page.. no lag

ublock02.jpg

 

Once i know its working as expected.. i commit it as permanent
ublock03a.jpg

 

Be sure to clear your browser cache and cookies once done, to retest for the lag

 

 

 

Bronwyn Vourtis, Google Analytics Top Contributor
Was my response helpful? If yes, please mark it as the ‘Best Answer.’ Learn how here

Page loading delay with Adblocker

Visitor ✭ ✭ ✭
# 5
Visitor ✭ ✭ ✭

Hello, 

so "Editor page" is set to https://www.(...).

I changed the "Standard URL" for the GA properties to include the www, per your suggestion.

 

Thanks for taking a look at uBlock. I am not sure if I understand what you would submit concretely, because creating a local rule for my uBlock instance may help locally - it does not help anybody else out there using this or any other ad blocker that might lead to a halt in rendering the page.

 

I have tested it this way: turn on uBlock, browse the page. Major "lag", exactly due to what you analyzed as well - connections refused.

Then I just turned it off - loads quick, no freeze in rendering the page at all.

 

So the question is, could the way Optimize work amended so it would not freeze everything in case it cannot do its calls. At least that is what I understand is causing the whole issue.

 

Thank you!

Moe

Marked as Best Answer.
Solution
Accepted by topic author Mohammed B
June

Re: Page loading delay with Adblocker

Top Contributor
# 6
Top Contributor

if someone has ublock or adblock installed.. (from the reading i was doing - sorry i have lost the page so i cannot reference it) they prevent analytics from loading by default via the  Peter Lowe’s Ad server list‎.

Optimize container isnt going to load.. analytics is not loading.. so the full timeout occurs before the default page appears.

 

You can shorten the length of the timeout in the page hiding snippet. the default is 4000,

 https://developers.google.com/optimize/#changing_the_timeout

 

I havent had time to test any of this.. but im wondering if

server side experiments would remove the lag if someone is using a blocker

https://developers.google.com/optimize/devguides/experiments

or

if you can add some kind of adblock detection script and if blocking is not enabled.. 

then the default page hide script can run..

Bronwyn Vourtis, Google Analytics Top Contributor
Was my response helpful? If yes, please mark it as the ‘Best Answer.’ Learn how here

Page loading delay with Adblocker

Visitor ✭ ✭ ✭
# 7
Visitor ✭ ✭ ✭
Hi,
 
thank you. I will play with these settings but do think the default script should cope more gracefully with ad blockers, generally speaking.
 
Best regards
Mo

Page loading delay with Adblocker

Visitor ✭ ✭ ✭
# 8
Visitor ✭ ✭ ✭

Hi, it definitely improves the freeze to reduce the "page hiding snippet length" per your suggestion, Bronwyn! I will still stick with my statement that the whole complexity deserves a thought by the GA Optimize team. Still, this really helps. Thanks again!