Should we add the google analytics code to all the pages in our website or only the homepage? any suggestions? If sites have 100 pages then how can you put tracking code instantly in every pages??
I think you didn't get my question. I'm asking "Should we add the google analytics code to all the pages in our website or only the homepage?" & second thing google analytics code before closing </body> tag is recommendable.
It goes inbetween the <head> </head> unless your using a cms or excommerce cart/site, then use the admin backend to insert it
We put analytics code on each page just above the closing body tag but now as i know google say put just above clsoing tag of head.If a site have many pages then to put code on each page instantly in php we can use incude or requre function.
Yes, it is necessary that you place the code in all the pages that you need to track. Having 100 pages doesn't mean that you paste the code on each page...just pick out the important pages you want to track the user interaction for and place the code on them.
You put your code on That pages in which you want to get traffic, Put it out just before closing head tag or before closing body tag.It will be activate at the same time but some time in after 24 hours.after the code activation you can see the users/clients reflection with the help of Google analytic of the particular pages
The best place to put the GA code is below the <head> and above the <body> tag if there is a simple html page. If there is a separate header page then it is the best place to place the code.
If you have a Static website then you have to add Tracking on all pages. But if you have a Dynamic website then you can add Tracking code on Home Page only. Because in dynamic website all contents coming from Database. But in Static website all pages are separated with file extension like .html, .php, .aspx... And Google Tracking Code always put before </body> tag.
If you have 100 of web pages then simply create a file with .php extension and includes the file to each page. Generally you need not to track every page. So first of all sort out the pages that you need to track and then add the codes in it.
You have to put Google analytics code before </head> tag . It will be best place to put analytics code.
It really needs to be on all pages - if not you won't really track anything other than a small portion of your traffic and won't underatand what you visitors are doing once on your site