Base solution for your next web application
Open Closed

Google Analytics #3780


User avatar
0
pumbinha created

Hi all,

I would like to integrate Google Analytics with my website. I found that a couple of Google settings can be set in the web.config file, but I guess these are for the external authentication.

Is this currently implemented or should I paste the Google script in some specific file? In case I want to do this, which file would be the best to track all the pages? (probable some layout file or something shared across all the pages).

Thank you in advance,

Greetings.


1 Answer(s)
  • User Avatar
    0
    alper created
    Support Team

    hi you can put it in _Layout.cshtml before end of body tag.

    <!DOCTYPE html>
    <html lang="en">
    <head>
    
      ....
    
        @Html.Partial("~/Views/Layout/_GoogleAnalytics.cshtml")
    </body>
    </html>