Google analytics

Discuss phpwcms here, please do not post support requests, bug reports, or feature requests! Non-phpwcms questions, discussion goes in General Chat!
Post Reply
bepposun
Posts: 16
Joined: Fri 22. Jun 2007, 17:28

Google analytics

Post 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
User avatar
Kosse
Posts: 1066
Joined: Thu 9. Sep 2004, 12:08
Location: Brussels, Belgium
Contact:

Post 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
User avatar
isac
Posts: 410
Joined: Tue 18. Nov 2003, 13:13
Location: Portugal
Contact:

Post 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
POR :D TUGAL
User avatar
Jensensen
Posts: 3000
Joined: Tue 17. Oct 2006, 21:11
Location: auf der mlauer

Post by Jensensen »

...add the tracking code to each template page before the closing </body> tag
greetz
{so_much} | Knick-Knack. | GitHub
Umlaute im URL sind meistens immer Kacke.
bepposun
Posts: 16
Joined: Fri 22. Jun 2007, 17:28

phpMyVisites vs. GoogleAnalytics

Post by bepposun »

It seems to work now with Google Analytics, thanks for the hint. Is it worth to use phpMyVisites instead?

Cheers, Beppo
User avatar
Jensensen
Posts: 3000
Joined: Tue 17. Oct 2006, 21:11
Location: auf der mlauer

Post 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
{so_much} | Knick-Knack. | GitHub
Umlaute im URL sind meistens immer Kacke.
Post Reply