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
4.2K members online now
4.2K 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

Google Analytics is slowing down

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

Our web pages are downloading slowly intermittently. Our analysis found out that google analytics is taking a total of 151.01ms, [46.93 (waiting TTFB 45.8ms and downloading 0.86ms), 49.87 and 54.21ms 3 times on each session of 35 bytes each] and our aspx page only taking 54.21ms.

 

Parameter Waiting (TTFB) taking majority of time all instances.

 

Here is the code we have used,

<!-- Google Analytics code Start --->

 

<script>

(function (i, s, o, g, r, a, m) {

i['GoogleAnalyticsObject'] = r; i[r] = i[r] || function () {

(i[r].q = i[r].q || []).push(arguments)

}, i[r].l = 1 * new Date(); a = s.createElement(o),

m = s.getElementsByTagName(o)[0]; a.async = 1; a.src=g; m.parentNode.insertBefore(a, m)

})(window, document, 'script', '//www.google-analytics.com/analytics.js', 'ga');

 

ga('create', 'UA-xxxxxxxx-x', 'auto');

ga('send', 'pageview');

 

</script>

 

<!-- Google Analytics code End --->

 

Any help much apritiated.

 

1 Expert replyverified_user

Google Analytics is slowing down

Top Contributor
# 2
Top Contributor

Are you able to also pls provide a link to the website?

Thanks
Bronwyn

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

Google Analytics is slowing down

Visitor ✭ ✭ ✭
# 3
Visitor ✭ ✭ ✭

Hi Bronwyn,

 

here is the URL

http://bmdnotices.com/remembrance-garden-book/index.aspx

 

Thanks

BMDnotices.com

Re: Google Analytics is slowing down

Top Contributor
# 4
Top Contributor

Hi, a link just to the site homepage would have been fine

 

there are a couple of issues happening 

 

currently the tracking code is positioned inside a form tag towards the bottom of the website pages.

(copy paste from site)

 

</div>

<!-- Google Analytics code Start --->

<script>
    (function (i, s, o, g, r, a, m) {
        i['GoogleAnalyticsObject'] = r; i[r] = i[r] || function () {
            (i[r].q = i[r].q || []).push(arguments)
        }, i[r].l = 1 * new Date(); a = s.createElement(o),
        m = s.getElementsByTagName(o)[0]; a.async = 1; a.src=g; m.parentNode.insertBefore(a, m)
    })(window, document, 'script', '//www.google-analytics.com/analytics.js', 'ga');

    ga('create', 'UA-24290416-1', 'auto');
    ga('send', 'pageview');

</script>

<!-- Google Analytics code End --->

    </form>
</body>
</html>

 

It should be positioned before the closing </head> tag, or if not possible, then before the closing </body> tag.
there also seems to be issues with how the container code for Google Tag Manager is installed too.. multiple copies of the code with incorrect positioning of at least one instance

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