Easy setup for Piwik analytics in Roundcube Webmail.
Featured on the official Piwik Integrations page.
This is a fork of roundcube_google_analytics.
Installation
- Copy the contents of the extracted directory to plugins/piwik_analytics
- Add piwik_analytics to $rcmail_config[‘plugins’] in config/main.inc.php
Configuration
- Copy plugins/piwik_analytics/config/config.inc.php.dist to plugins/piwik_analytics/config/config.inc.php
- Edit the new file and fill in all the appropriate settings.
Download
Date: March 29 2011
Version: 1.0
Vielen Dank für das Plugin! Mir ist bei der Installation auf einer SSL-verschlüsselten Seite aufgefallen, dass beim Piwik-Code ein kleiner Fehler enthalten ist.
So stimmt “pkBaseURL” für SSL-verschlüsselte Seiten nicht, die Zeile sollte:
var pkBaseURL = ((“https:” == document.location.protocol) ? “https://’ . $rcmail->config->get(‘piwik_analytics_domain’) . ‘/” : “http://’ . $rcmail->config->get(‘piwik_analytics_domain’) . ‘/”);
lauten, also eigentlich nur das ersten “http://” durch “https://” ersetzen.
Nachdem ich das erledigt hatte, lief es bei mir auch über die SSL-Verschlüsselung.
Schönen Gruß!
Vielen Dank für das Entdecken und Ausbessern des Fehlers!
Ich habe das Plugin nun korrigiert und werde gleich eine neue Version hochladen.
http://tracking.42dev.eu/projects/piwik-analytics
Hi,
Good work on this extension, I appreciate you sharing this. I would have a question if I could. I am a hosting company and provide the Roundcube Webmail as a global install domain.com/webmail so this one install works for 50 or so websites. Is there a way to track all of them in the same Piwik user account.
Best wishes,
Thom
You could probably modify the tracking code to dynamically insert the correct site ID according to the current domain.
The Piwik Documentation at http://piwik.org/docs/ especially http://piwik.org/docs/tracking-api/ should be able to help you.
hi, great plugin!
i’m trying to figure out how to get a user logins level stats, like a top ten of most logged users. do you know if is it posible using this plugin+piwik combination?
I’d suggest reading through the developer docs at http://piwik.org
There should be a way to manually call the API and track those kind of things.
For the last Piwik version it must change to:
$script = ‘
var _paq = _paq || [];
_paq.push([\’trackPageView\’]);
_paq.push([\’enableLinkTracking\’]);
(function() {
var u=”//’ . $rcmail->config->get(‘piwik_analytics_domain’) . ‘/”;
_paq.push([\’setTrackerUrl\’, u+\’piwik.php\’]);
_paq.push([\’setSiteId\’, ‘ . $rcmail->config->get(‘piwik_analytics_id’) . ‘]);
var d=document, g=d.createElement(\’script\’), s=d.getElementsByTagName(\’script\’)[0];
g.type=\’text/javascript\’; g.async=true; g.defer=true; g.src=u+\’piwik.js\’; s.parentNode.insertBefore(g,s);
})();
config->get(‘piwik_analytics_domain’) . ‘/piwik.php?idsite=’ . $rcmail->config->get(‘piwik_analytics_id’) . ‘” style=”border:0;” alt=”” />
‘;
Hi, where do we insert the script above?