Piwik kennt sogenannte custom variables (oder benutzerdefinierte variablen) und kann mit bis zu 5 von ihnen umgehen. Um User eines phpbb3 Forums in Piwik zu tracken sind Änderungen am Sourcecode des Forums nötig. Diese beschränken sich auf root/styles/prosilver/template/overall_header.html
Voraussetzung: eine laufende Piwik Integration
Ziel: Der Track möglichst viele Informationen aus dem phpbb Forum mitgeben.
Was du tracken kannst: http://wiki.phpbb.com/Global_Template_Variables
Du musst deinen Piwik-Code um folgendes erweitern:
1 2 3 4 5 6 7 8 | if(Username != "Anonymous") { piwikTracker.setCustomVariable( 1, // Index, the number from 1 to 5 where this custom variable name is stored "Username", // the name of the variable "{S_USERNAME}", // value - this will be replaced by phpbb to the current username "visit" // scope ); } |
Referenz zur Integration: http://piwik.org/docs/custom-variables/
Nachlesen von piwikTracker.setCustomVariable http://piwik.org/docs/javascript-tracking/#toc-custom-variables
is the 1 suppose to be the siteid ? I am confused what you mean by index in the comment?
As mentioned in the article it’s piwik specific code. It’s actually a call to piwik. If you look at the linked documentation about custom variables you’ll find the explanation of the index parameter. So: 1, // Index, the number from 1 to 5 where this custom variable name is stored
It is just an identifier for your custom variable.
Very sorry I was viewing it through google translater and it badly cut up the JS code section. Feel free to delete my comments all together. Again sorry for the noise.
Don’t worry. If you need further assistance for this integration just let me know.