Welcome to WebmasterWorld Guest from 107.22.7.35

Forum Moderators: DixonJones & mademetop

Message Too Old, No Replies

Google analytics code on basic HTML website

     
7:28 am on Mar 28, 2013 (gmt 0)



Hi there
I've a website which is built in basic HTML. I've installed analytics code on home page in header section but the code appears only on home page. Do i have to install code on each and every webpage manually? This would be difficult and time consuming work. Please suggest me some other way.
Thanks in advance.

P.S-the website can not be shifted to some other platform (wordpress or joomla or anything) this wouldn't be a solution for me.
7:44 am on Mar 28, 2013 (gmt 0)

WebmasterWorld Administrator phranque is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



welcome to WebmasterWorld, sweetswat08!

yes - you will need analytics code on each web page for which you want to see analytics.
8:21 am on Mar 28, 2013 (gmt 0)



Thanks Phranque!
I wish there was some easier way. Still, many thanks :)
9:03 am on Mar 28, 2013 (gmt 0)

WebmasterWorld Senior Member g1smd is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



In htaccess on an Apache server you can define a file to prepend to the end of each page.

If that facility is available to you, you could add the analtyics code in that file.
10:30 pm on Mar 28, 2013 (gmt 0)

WebmasterWorld Senior Member lucy24 is a WebmasterWorld Top Contributor of All Time Top Contributors Of The Month



Option Two is server-side includes. You would have to edit each static file once to allow for the include, and add one or two lines to htaccess to parse html as shtml (assuming you don't want to change every single URL and filename everywhere). But once the include code is in place, it's there forever and you can start adding other stuff as well :)

Why do they want it in the HEAD? Analytics has no effect on page content, so shoving it down at the bottom should work equally well, and will let the page load a teeny bit faster.
 

Featured Threads

Hot Threads This Week

Hot Threads This Month