Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Archive /

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, biapar, Willr, Ingo, simon_w

why is this not working




Forum Moderator, 213 Posts

2 April 2008 at 12:34pm

Hi I have the following PHP file:

class GoogleAnalytics extends ContentController {

static $googleAnalyticsCode;
   function init() {
Public function analyticsCode() {
echo "xyz";
return self::$googleAnalyticsCode;

In my /Includes/ file I have

the Analytics template is included, but I do not get an error message (because of the echo and there is no analyticsCode. I was wondering if anyone can tell what I am doing wrong - please?