I use statcounter and google analytics on my sites, normally I would just put these in the head area of the theme template but after reading with yellowled said in another thread I'm a little reluctant to add it where I normally do
Where would you have this code live?
Code: Select all
<!-- Start of StatCounter Code -->
<script type="text/javascript">
var sc_project=*******;
var sc_invisible=1;
var sc_partition=51;
var sc_click_stat=1;
var sc_security="*******";
</script>
<script type="text/javascript" src="http://www.statcounter.com/counter/counter.js"></script><noscript><div class="statcounter"><a title="free hit counters" href="http://www.statcounter.com/free_hit_counter.html" target="_blank"><img class="statcounter" src="http://c.statcounter.com/4138911/0/dcb5b7f0/1/" alt="free hit counters" ></a></div></noscript>
<!-- End of StatCounter Code -->
Code: Select all
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', '########-##']);
_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>