Warning: require_once(plugins/GoogleAnalyticsPlugin.php) [function.require-once]: failed to open stream: No such file or directory in /var/www/vhosts/mysite/httpdocs/czesc/config.php on line 59
Fatal error: require_once() [function.require]: Failed opening required 'plugins/GoogleAnalyticsPlugin.php' (include_path='.::/var/www/vhosts/mysite/httpdocs/czesc/extlib/') in /var/www/vhosts/mysite/httpdocs/czesc/config.php on line 59
@wthem Looks like it should be this require_once('plugins/GoogleAnalytics/GoogleAnalyticsPlugin.php'); $ga = new GoogleAnalyticsPlugin('YOUR-GOOGLE-ANALYTICS-CODE');
all i have tried add code to my index.php. but cant work for me. still show that i havent installed the google analytics code. pls tell me how to do it in detail. thanks
No, you don't edit index.php. You edit config.php and add the following code:
[code] require_once('plugins/GoogleAnalytics/GoogleAnalyticsPlugin.php'); $ga = new GoogleAnalyticsPlugin('YOUR-GOOGLE-ANALYTICS-CODE'); [/code]
Be sure to replace the all-caps part with your google analytics code.
Also, I believe Google's terms require a notice on the site that you are using GA. You'll have to check Google's site to determine exactly what their requirements are.
@gjh592970101: You should have either a config.php.sample or config.php in the root of your StatusNet installation. You need to add the code of @lnxwalt above to the config.php-File. If you don't have this file, copy and rename config.php.sample to config.php and edit this one.
@gjh592970101 This forum here is *only* for questions related to StatusNet. If you've got troubles with another software you have to ask those developers...
Comments
Now where do i put the Tracker code(UA-24242424-1) ? and how do i Activate the plugin?
thanks
its working ok :)
require_once('plugins/GoogleAnalyticsPlugin.php');
$ga = new GoogleAnalyticsPlugin('YOUR-GOOGLE-ANALYTICS-CODE');
As @mktw said, it is also included on the wiki: http://status.net/wiki/Plugins#Google_Analytics
Warning: require_once(plugins/GoogleAnalyticsPlugin.php) [function.require-once]: failed to open stream: No such file or directory in /var/www/vhosts/mysite/httpdocs/czesc/config.php on line 59
Fatal error: require_once() [function.require]: Failed opening required 'plugins/GoogleAnalyticsPlugin.php' (include_path='.::/var/www/vhosts/mysite/httpdocs/czesc/extlib/') in /var/www/vhosts/mysite/httpdocs/czesc/config.php on line 59
require_once('plugins/GoogleAnalytics/GoogleAnalyticsPlugin.php');$ga = new GoogleAnalyticsPlugin('YOUR-GOOGLE-ANALYTICS-CODE');
The easiest is:
addPlugin('GoogleAnalytics', array('code' => 'UA-24242424-1'));
all i have tried add code to my index.php. but cant work for me. still show that i havent installed the google analytics code. pls tell me how to do it in detail. thanks
msn: flyskybd06@hotmail.com.
No, you don't edit index.php. You edit config.php and add the following code:
[code]
require_once('plugins/GoogleAnalytics/GoogleAnalyticsPlugin.php');
$ga = new GoogleAnalyticsPlugin('YOUR-GOOGLE-ANALYTICS-CODE');
[/code]
Be sure to replace the all-caps part with your google analytics code.
Also, I believe Google's terms require a notice on the site that you are using GA. You'll have to check Google's site to determine exactly what their requirements are.
but there is not config.php. just have dt-config.php in config file.
StatusNet installation?? is my website related with statusnet?
oh, i see now. thanks. BTW, i have done it. my website is related ga now. thanks all.