• 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


Well-known member
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,

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

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