Google Analytics Help

MrMaster

Golden Member
Nov 16, 2001
1,235
2
76
www.pc-prime.com
I cut and pasted the Google Analytics code right before the </body> tag. As seen as looking at the page source:

</table><script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(*****("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-88362-2");
pageTracker._trackPageview();
</script>
</body>

</html>

Anyone know what I am doing wrong? Google Analytics says "Tracking Not Installed"

It is hosted on godaddy.
 

Snapster

Diamond Member
Oct 14, 2001
3,916
0
0
Looking at the basics it seems you're missing the initData. It should be something along the lines of:

<script type="text/javascript">

var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(*****("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));

var pageTracker = _gat._getTracker("UA-88362-2");
pageTracker._initData();
pageTracker._trackPageview();

</script>

***** being the u n e s a p e
 

CrazyLazy

Platinum Member
Jun 21, 2008
2,124
1
0
Double check that you are copy pasting the code in correctly and isn't being modified for some reason after you save the file. Also do you have the code on every single page of the site? It might help to have a link to the site in question if none of the stuff suggested in this thread is working.
 

MrMaster

Golden Member
Nov 16, 2001
1,235
2
76
www.pc-prime.com
The code on top is from google's analytics. The second set is copied and pasted from the source page. http://www.pc-prime.com

<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(*****("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-88362-3");
pageTracker._trackPageview();
</script>

<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(*****("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-88362-3");
pageTracker._trackPageview();
</script>
 

Snapster

Diamond Member
Oct 14, 2001
3,916
0
0
You're still missing the init line:

<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(*****("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-88362-3");
pageTracker._initData();
pageTracker._trackPageview();
</script>

***** being u n e s c a p e
 

Snapster

Diamond Member
Oct 14, 2001
3,916
0
0
I'm getting a pagetracker not defined error on that link. The code looks 100% correct still and I can still browse to ga.js manually, but it seems to be failing on the assigning the account (_gat._getTracker("UA-88362-3"));