AdWords is now Google Ads. Our new name reflects the full range of advertising options we offer across Search, Display, YouTube, and more. Learn more

Analytics
1.9K members online now
1.9K members online now
Dive into multiple domain (Cross/Sub) tracking, implementing Ecommerce and Enhanced Ecommerce, setting up Event tracking, and Universal Analytics code.
 
Guide Me
star_border
Reply

Huge delay in page render

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

Using Wordpress, latest analytics code copied & pasted from analytics admin page.

Loading it in the <head>

 

Delay of page render by 5-10 seconds....removed code, instant page render! Though other scripts take 10 seconds or so to complete and page continues loading, but at least page is visible and links can be clicked etc.

 

Have installed async plugin for WP but makes no difference. Anyway I read that latest analytics code should be async by default.

 

Any idea whats wrong please?

 

(Have had to move analytics loading code to bottom of <body>)

1 Expert replyverified_user

Re: Huge delay in page render

[ Edited ]
Explorer ✭ ✭ ✭
# 2
Explorer ✭ ✭ ✭

Hi Paul,

May I suggest you look into using Google Tag Manager rather to add you analytics code. You can use the Wordpress plugin "Tag Manager" to install it. You can watch this easy tutorial https://www.youtube.com/watch?v=ibj2k4lCf-Q or read the following documentation https://support.google.com/tagmanager/answer/6103696?hl=en

You may be having some conflict issues with other plugins etc.

Re: Huge delay in page render

[ Edited ]
Top Contributor
# 3
Top Contributor

Hi Paul :-)
if you are seeking a wordpress plugin to insert the google analytics tracking code you need to ensure they support the current version of tracking - Universal analytics.js..
I usually recommend either of the following:
https://wordpress.org/plugins/google-analytics-dashboard-for-wp/
https://wordpress.org/plugins/google-analytics-for-wordpress/
Also make sure your WordPress, current active theme and any other plugins are up to date.

(Universal analytics.js is asynchronous however the previous version of the tracking code, ga.js is referred to as the Async version, with the non async version before that known as Traditional ga.js)

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