Page 1 of 1

Google analytics

Posted: Wed 18. Jul 2007, 16:29
by bepposun
Maybe a stupid question,

I would like to use Google analytics to track the visits. There is a code which should inserted in the html file. Where to put it in in phpwcms?

index.php ?
pixelTracking.php ?

Cheers, Beppo

Posted: Wed 18. Jul 2007, 17:06
by Kosse
index.php

Put this in between( with your google analytics code)

Code: Select all

	$content['page_end'] .= '<!-- analytics -->\n<script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
	</script>
	<script type="text/javascript">
	_uacct = "UA-1787950-1";
	urchinTracker();
	</script>\n';
Cheers

Posted: Wed 18. Jul 2007, 17:28
by isac
Kosse wrote:index.php

Put this in between( with your google analytics code)

Code: Select all

	$content['page_end'] .= '<!-- analytics -->\n<script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
	</script>
	<script type="text/javascript">
	_uacct = "UA-1787950-1";
	urchinTracker();
	</script>\n';
Cheers
or

move pixelTracking.php to frontend_render and turn Google Analytics ON

Code: Select all

/*
 * Google Aanalytics
 */
$_Tracking_GoogleAnalytics		= ON; /* <-- Turn it ON */
$_Tracking_GoogleAnalyticsCode	= 'UA-00000-1'; /* <-- Your Code */
$_Tracking_GoogleSSL			= Off;
Dont forget to turn off * phpMyVisites

Posted: Wed 18. Jul 2007, 22:32
by Jensensen
...add the tracking code to each template page before the closing </body> tag
greetz

phpMyVisites vs. GoogleAnalytics

Posted: Fri 20. Jul 2007, 17:14
by bepposun
It seems to work now with Google Analytics, thanks for the hint. Is it worth to use phpMyVisites instead?

Cheers, Beppo

Posted: Fri 20. Jul 2007, 18:04
by Jensensen
can be worth to use both, others too, or at least more than one statistic/analytic tool to get a wider range of values.
you are able to compare the results, validate reports against others and you can take the numbers as proof for reliability and so on

greetz