• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XF 1.5 Analytics - Bad Event Tracking Code

Solidus

Well-known member
#1
Hi team.

This error is showing in Google Analytics,



Using the Tag Assistant as recommended, I am told "Code found outside of <head> tag". Which is confusing because the google_analytics template is called in PAGE_CONTAINER immediately before </head>, like so,

Code:
<xen:include template="google_analytics" />
</head>
But when viewing the page source of forum index, this is on line 2667

Code:
ga('create', 'UA-51233726-1', 'auto');
    ga('send', 'pageview');
and </head> is on line 86. Any idea what is going on here?