Did a forum search and found that to play nicely, google analytic code should go before the closing tag and within {literal} tags. To install the GA code, i simply copied and pasted into my template within the CMSMS admin.
I have the google js code in there, but Google Analytics is telling me the status is bad (can't find the code)
I know it takes 24 hours for reporting to 'catch up', but it isn't clear if the status indicator needs time to acquire the status of the GA code... seems like it should recognize it instantaneously (no?)
I'm running PHP 4.4.1, CMS version 1.5.3
CMSMS install indicated that safe mode is on, but my php.ini says differently. I'm using just one template and have only the default modules installed.
Right now i am in the testing stages and CMSMS is in a sub directory of my domain's webroot ("http://mydomain/cmsmadesimple/"). Do you think that is what's throwing google analytics off? Does GA need to
pointed at the webroot or can i run GA code on pages within this sub dir?
I noticed that 'process_whole_template' is set to false in config.. does that have any ramifications?
Want to dig further, but not quite sure where to start... Thanks for any help for a next step!
Google Analytics - yes i searched the forum!
-
- Forum Members
- Posts: 65
- Joined: Tue May 22, 2007 10:05 pm
Re: Google Analytics - yes i searched the forum!
Hi Natrop
OK - I can't remember what the instructions said now, but I have got GA set up and working fine on my site - and this too is under a subdomain.
On my template I have put the after the tag but before the first
Like this
OK - I can't remember what the instructions said now, but I have got GA set up and working fine on my site - and this too is under a subdomain.
On my template I have put the after the tag but before the first
Like this
Code: Select all
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<__html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<link REL="SHORTCUT ICON" href="uploads/images/favicon.ico">
<!-- Type the title of your site here -->
<title>Christ Church Guildford - {title}</title>
{metadata}
{stylesheet}
{cms_selflink dir="start" rellink=1}
{cms_selflink dir="prev" rellink=1}
{cms_selflink dir="next" rellink=1}
</head>
{literal}
<__script__ type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</__script>
<__script__ type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-xxxxxxx-1");
pageTracker._trackPageview();
} catch(err) {}</__script>
{/literal}
</__body>