Seggestion. Move the code for Google Analytics "before the closing </head>"

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
7 years ago
From Google
https://support.google.com/analytics/answer/1008080

2. Paste your tracking code snippet into its own include file, then include it in your page header, so that the snippet appears before the closing </head> tag on every web page on your site you wish to track.

One of our customer had a small problem. Google support answered us to move Google Analytics code "before the closing </head>".

Can you add a new widgetzone head_html_tag_bottom and add this code in _Root.Head.cshtml ?

@Html.Widget("head_html_tag_bottom")


I think you should change the default value for plugin Widgets.GoogleAnalytics too.
7 years ago
Thanks for suggestion!

Please use "googleAnalyticsSettings.WidgetZone" setting to specify any custom widget zone instead of "body_end_html_tag_before"
7 years ago
Hello,
Can you clarify what is the file where you would insert the google analytic tracking. I am trying to set up the webtools with the tracking code google-site-verification: googlea19333b252d35e05.html and it is not verifying anywhere I have tried to insert.

Thanks
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.