Where to put google analytics?

###before body
Google used to recommend putting it just before the end of body tag, but there is some loading problem of the js.

###before head
Current recommendation is just before the tag.
< head> will add a little latency; in the footer will reduce the number of pageviews recorded at some small margin.
As a matter of personal preference, I like to include it in the

< head>, but its really a matter of preference.

Add a Comment