Hey folks! I'm trying to install google analytics into my website and I need to paste some code before the </body>. I know enough HTML to get me around to do things like this, but I've looked at my site and it starts: ------------------ <?php include("header.php"); require_once("classes/static_pages.class.php"); $sbg_obj = new static_pages(); $id=$_GET['static_pg_id']; $statqry3 = "select * from " . $sbg_obj->cls_tbl . " where page_id='1'"; $staresult3 = mysql_query($statqry3); $stadata3 = mysql_fetch_assoc($staresult3); ------------------------------------------ To make it worse, my developers haven't responded to my emails in 3 weeks. -( Can anyone give me some suggestions as to where I should copy and paste the google analytics script? Thanks in advance! Spock
Two guesses: -he uses templates (cannot figure out where thy are located from the code you posted) -he uses the database to store the databases need more code ..
Hey - thanks for your response aquilax. What sort of code would I need to paste for you to get a good feel? Should I paste all of what I find on index.php? Thanks!
it seems to include header.php - if this includes the <head> </head> you can embed analytics there - although latest trend is to lazy load it async and doing so is best done in the footer just before the end of the </body> http://googlecode.blogspot.com/2009/12/google-analytics-launches-asynchronous.html so look for a similar include for footer.php
It seems that it is written in PHP. You can imbed the code into any PHP file Look for the head or body section in the PHP file and then determine placement reading though the available HTML that's all ready in place.
if it's a Joomla site from the admin panel - go to your templates - and hit the edit html button if your using firefox - hit ctrl f and search for /body - then just add the google code before it hope that helps
i think joomla sites are normally recognizable from backend.....rather than front end ...if developer really want to conceal that site is joomla site.... The classname and structure seems like joomla to me... but u can download joomla and check the filenames...(ur filename and filenames in joomla) the developer will not have time to rename each page individually(at max foldernames may be changed..)
Very valuable information everybody - thanks very much. I installed GA into this recently so I'll see if its' actually working. Thanks again for ALL the comments and help.
..awesome - it's working a charm. I didn't even need to paste the GA code into all the pages - just one, and it seemed to 'know'. -)