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?
If you are using the GA plugin from the EPiServer Add-Ons, you actually only need this in the bottom of the layout:
Optionally, you could manually get the GA script using this:
If you look at the developer guide for the GA module for CMS 6 R2, they briefly mention how to use it in MVC:
I missed that line when I read through the documentation.