Performance issue because of Google Adwords

142 Views Asked by At

I want to improve performance of website, and currently I got stuck with Google Adwords problem. I have already speeded it (website) up from ~4 seconds to ~1.8 seconds but now webpagetest.org run on this website looks that:

enter image description here

Step by step (excluding unimportant requests):

Request 6

It is Google Tag Manager script - I use it to setup Google Analytics Universal code & Google Adwords (with some conversions)

Request 8 & 9

There are standard GA scripts. If there were no AdWords on my website, that would have been end of including Google Scripts (~200-300ms => not bad). But...

Request 9, 10, 11, 12

...because I have Google AdWords enabled scripts start with awful waterfall: - script 9 does redirect to 10 - script 10 does redirect to 11 - script 11 does redirect to 12 It takes 52ms + 221ms + 139ms + 175ms => ~600ms what in my case (1800ms for whole website) is very very bad result :(

I know the problem is in Google Adwords but maybe do You have any ideas how I can move these redirects after a load event (when website is already loaded and redirects don't stop other logic).

Why I'm sure it's beacuse of AdWords?? I prepared test page with only Google Tag Manager and enabled Google Analytics Universal and there were no redirects. After that I added Google Adwords tag with conversion => 3 redirects :(

1

There are 1 best solutions below

1
On

Why is this a problem?

Google Tag Manager, Analytics and Adwords load asynchronously to prevent holding up your page too much.

Your start render time is the green line at around 0.6 seconds. Your DOM Complete time us the purple line at 1.2 seconds and at this point the page is basically complete apart from async scripts.

So the other Google loads are not holding up your page load. They are holding up your document complete time but that may or may not be a problem.

So my point is - don't just concentrate on the numbers. And if you are concentrating on them then make sure you are concentrating on the right numbers! Use the film strip view to see how your page loads.

Also this will not be as big a deal for second and subsequent loads or other page views as people browse around your site as they will be cached.

However if you really want to improve this then I can suggest a couple of things:

  1. Split out Google Analytics and Adwords from Google Tag Manager so they can load immediately. There are advantages of having them in GTM but downside is if have to load that to then load them so it naturally creates a delay. Only you can decide if that delay is worth it.

  2. Investigate preconnect to do the connection and SSL negotiation upfront. Also Chrome will soon have preload to allow to specify scripts to download in advance.