Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

asp.net web stats - google analytics

i want to add tracking to my website. I saw google analytics which seems to track what i need.

So do i stick the google analytics snippet in each page, in a master page, just in my default page? what is the best practice here to get the best metrics.

like image 826
leora Avatar asked Sep 19 '26 06:09

leora


1 Answers

The google analytics code snippet has to be on every page you want to track.

Easiest is to put the code into the master page(s) if you use them.

Otherwise put it on every page, or put it into a user control which you can include on the relevant pages or include it using a server-side include, e.g:

<!-- #include file="file_containing_google_analytics_code.js" -->
like image 71
M4N Avatar answered Sep 20 '26 21:09

M4N



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!