AI OnAI Off
If you are using the GA plugin from the EPiServer Add-Ons, you actually only need this in the bottom of the layout:
@Html.Raw(Html.RequiredClientResources("Footer"))
Optionally, you could manually get the GA script using this:
@Html.AnalyticsTrackingScript(currentPage)
If you look at the developer guide for the GA module for CMS 6 R2, they briefly mention how to use it in MVC:
Hi
We are using MVC4 on our EPiServer 7 CMS project and want to add the Google Analytics plugin.
However, as the plugin documentation mentions only the web forms implementation, I am wondering how we output the GA Script when using _Layout.cshtml and Razor syntax.
Is it possible for us to use the GA Plugin with MVC and Razor syntax?
Martin Graney