Google Analytics
Google Analytics
I just can't seem to get this to work. I put the code in my template, no activity in Analytics. I also put the code in my footer content block, still no activity showing up in Analytics.
Does anyone have a step by step guide for this? Also, is there any other stats type module?
BTW, the site is my wife's daycare at http://www.justlikehomedaycare.org in case you can find something wrong.
Thanks for the help.
Does anyone have a step by step guide for this? Also, is there any other stats type module?
BTW, the site is my wife's daycare at http://www.justlikehomedaycare.org in case you can find something wrong.
Thanks for the help.
-
- Support Guru
- Posts: 8169
- Joined: Tue Oct 19, 2004 6:44 pm
- Location: Fernie British Columbia, Canada
Re: Google Analytics
Seeing posts like this....
is there any wonder why the people with the knowledge to give help wont.
is there any wonder why the people with the knowledge to give help wont.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Re: Google Analytics
Thanks a lot for the help. There is no reason to act like a jerk or elitist.
Is there something I'm missing by asking for help? I searched the forums but did not find another post that really answered the question I had. In fact this is the only one that stated where to put the code. But there really is no answer as to where to post the code.
All I did was ask a question. Thanks anyway.
Is there something I'm missing by asking for help? I searched the forums but did not find another post that really answered the question I had. In fact this is the only one that stated where to put the code. But there really is no answer as to where to post the code.
All I did was ask a question. Thanks anyway.
Re: Google Analytics
As mentioned by alby in the post you linked to, you just have to wrap your google javascript in {literal}{/literal} tags, and in that forum the original poster said that it's supposed to be before but it should really be inserted before the tag (notice its the closing tag)
So you should end up with something like this in your template:
if using a Global Content Block simply create a new one and it should look like this:
then stick it in your template and it would look like this:
That should do it
So you should end up with something like this in your template:
Code: Select all
...
{literal}
<__script__ type="text/javascript"> <!-- your google javascript starts here, just paste it -->
...
...
</__script>
{/literal}
<__body>
</__html>
Code: Select all
{literal}
<__script__ type="text/javascript"> <!-- your google javascript starts here, just paste it -->
...
...
</__script>
{/literal}
Code: Select all
...
{global_content name="your_gcb"}
<__body>
</__html>
Last edited by hexdj on Wed Nov 12, 2008 4:18 am, edited 1 time in total.
Re: Google Analytics
Thanks for your response.
You said to post before before the tag but your code has it after. I had it in the body tags before. I changed it and followed the example shown in your code. I'll see if that works
Once again thanks for helping.
You said to post before before the tag but your code has it after. I had it in the body tags before. I changed it and followed the example shown in your code. I'll see if that works
Once again thanks for helping.
Re: Google Analytics
You're correct, my bad! I fixed my post to show the code as it should be.
Re: Google Analytics
Hello Everybody. Im having pretty much the same problem. Im almost certain that ive included the tracking code correctly, in literal tags at the end of my template before the closing body tag.
The analytics account verifies that the code is there but no data shows up ???
Its baffling me completely - Im going to contact google but if anybody here has any ideas id appreciate them.
Ill let you know what google says if I get a response.
The analytics account verifies that the code is there but no data shows up ???
Its baffling me completely - Im going to contact google but if anybody here has any ideas id appreciate them.
Ill let you know what google says if I get a response.
Re: Google Analytics
When have you implemented the code? Please keep in mind that it may take up to 24 hours until you recieve the data
Best
Nils
Best
Nils
Re: Google Analytics
I think that was my biggest problem. But I also wanted the verify that I put the code in the correct location.nhaack wrote: When have you implemented the code? Please keep in mind that it may take up to 24 hours until you recieve the data
Re: Google Analytics
try asking harder questions it's even harder to get help lol... No, in all realness most everyone is willing to help... sometimes it just takes a long while... though question could have been answered if the had used that nifty search thing above... My2Centsfangji wrote: why the people with the knowledge to give help wont.![]()
jeremyBass
Re: Google Analytics
The biggest reason this seemed like it wasn't getting answered is that the poster gave very little info...
If you called your mechanic with something like "my car don't start why can't you tell me how come" what do you think they would say...
It has been asked/told numerous times to get all the info you can, they even put new pages and tools into the system to help get it, Site Admin > System Information is one...
So once again if you want better help read these and it may help...
http://forum.cmsmadesimple.org/index.ph ... ,40.0.html
If you called your mechanic with something like "my car don't start why can't you tell me how come" what do you think they would say...
It has been asked/told numerous times to get all the info you can, they even put new pages and tools into the system to help get it, Site Admin > System Information is one...
So once again if you want better help read these and it may help...
http://forum.cmsmadesimple.org/index.ph ... ,40.0.html
Re: Google Analytics
create an UDT(Extensions -> User defined tag), name it "ga"
use it like:
put it right before
Code: Select all
return '
<__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("'.$params['id'].'");
pageTracker._trackPageview();
} catch(err) {}</__script>
';
Code: Select all
{ga id="UA-555555-55"}
Re: Google Analytics
Thanks for the tip viebig!
-
- Forum Members
- Posts: 103
- Joined: Thu May 06, 2010 9:22 pm
Re: Google Analytics
viebig wrote: create an UDT(Extensions -> User defined tag), name it "ga"
use it like:Code: Select all
return ' <__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("'.$params['id'].'"); pageTracker._trackPageview(); } catch(err) {}</__script> ';
put it right beforeCode: Select all
{ga id="UA-555555-55"}
Great post, thanks viebig!
As a follow on, this would now be
Code: Select all
return '
<__script__ type="text/javascript">
var _gaq = _gaq || [];
_gaq.push([\'_setAccount\', \''.$params['id'].'\']);
_gaq.push([\'_trackPageview\']);
(function() {
var ga = document.createElement(\'script\'); ga.type = \'text/javascript\'; ga.async = true;
ga.src = (\'https:\' == document.location.protocol ? \'https://ssl\' : \'http://www\') + \'.google-analytics.com/ga.js\';
var s = document.getElementsByTagName(\'script\')[0]; s.parentNode.insertBefore(ga, s);
})();
</__script>
';

-
- Forum Members
- Posts: 20
- Joined: Tue May 25, 2010 12:43 am
Re: Google Analytics
Thanks a lot! I have created the tag, but how can I know the id of the tag? like you have mentioned:id="UA-555555-55", does that mean I can use any id?