Is there any kind of advantage of Google Analytics asynchronous monitoring code if it isn't positioned in the <head>?

I would certainly such as to most likely to the asynchronous Google Analytics manuscript, yet I would certainly instead not have it in the head (despite the fact that I recognize this is ideal technique ).

So, exists any kind of advantage of making use of the async code if it isn't in the head, and also conversely, would certainly it be secure to position in other places high in the web page, like simply inside the opening body tag, or in a.NET customer control that lots on top of the web page?


In the instructions Google mentions :

If that isn't an alternative, you can still place the asynchronous fragment at the end of the web page. You can additionally divide your fragment to preserve several of the advantages of asynchronous monitoring.

If I position the code there (without splitting ) do I still gain from asynchronous loading or is it minimal given that it goes to the lower anyhow?

2019-05-07 14:11:16
Source Share
Answers: 2

Compared to having the old monitoring code at the end of the web page, having the asynchronous code on top of the need to still suggest that the monitoring is more probable to register customers that leave the web page (or connect with components on the web page that are being tracked) prior to it has actually totally filled.

2019-05-09 09:57:11

You can place it anywhere you simply get one of the most gain from placing it in the header. The complete guideline to add it to your website are below -

You do intend to place it within the head or body tags though. Simply to be clear. Yet past that you can do whatever you desire.

2019-05-09 09:56:04