X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=plugins%2FGoogleAnalyticsPlugin.php;h=c646bf113b27223a015739fdfa061f8d25fc2ce1;hb=9684cbe3c6d61be0b1cc2094bc4278cd8a21b33e;hp=87a70e31ea9acf9f90f25e5f43b8091869add2b1;hpb=c6070200fe35a5746fac2f0b6d7665d1b598feb8;p=quix0rs-gnu-social.git diff --git a/plugins/GoogleAnalyticsPlugin.php b/plugins/GoogleAnalyticsPlugin.php index 87a70e31ea..c646bf113b 100644 --- a/plugins/GoogleAnalyticsPlugin.php +++ b/plugins/GoogleAnalyticsPlugin.php @@ -1,6 +1,6 @@ . * * @category Plugin - * @package Laconica - * @author Evan Prodromou - * @copyright 2008 Control Yourself, Inc. + * @package StatusNet + * @author Evan Prodromou + * @copyright 2008 StatusNet, Inc. * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0 - * @link http://laconi.ca/ + * @link http://status.net/ */ -if (!defined('LACONICA')) { +if (!defined('STATUSNET')) { exit(1); } @@ -37,13 +37,13 @@ if (!defined('LACONICA')) { * This plugin will spoot out the correct JavaScript spell to invoke Google Analytics on a page. * * Note that Google Analytics is not compatible with the Franklin Street Statement; consider using - * Pikiw (http://www.pikiw.org/) instead! + * Piwik (http://www.piwik.org/) instead! * * @category Plugin - * @package Laconica - * @author Evan Prodromou + * @package StatusNet + * @author Evan Prodromou * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0 - * @link http://laconi.ca/ + * @link http://status.net/ * * @see Event */ @@ -67,11 +67,19 @@ class GoogleAnalyticsPlugin extends Plugin 'pageTracker._trackPageview();'. '} catch(err) {}', $this->code); - $action->elementStart('script', array('type' => 'text/javascript')); - $action->raw($js1); - $action->elementEnd('script'); - $action->elementStart('script', array('type' => 'text/javascript')); - $action->raw($js2); - $action->elementEnd('script'); + $action->inlineScript($js1); + $action->inlineScript($js2); + } + + function onPluginVersion(&$versions) + { + $versions[] = array('name' => 'GoogleAnalytics', + 'version' => STATUSNET_VERSION, + 'author' => 'Evan Prodromou', + 'homepage' => 'http://status.net/wiki/Plugin:GoogleAnalytics', + 'rawdescription' => + _m('Use Google Analytics'. + ' to track Web access.')); + return true; } }