Page 1 of 1

Integration of Piwik into phpbb with board3

Posted: 16. June 2009 20:02
by DutchToxophilite
Your Portal Version: 1.0.3
Your phpBB Type: Standard phpBB3
MODs installed: Yes
Your knowledge: Advanced Knowledge
Boardlink: http://www.handboogforum.nl

What have you done before the problem was there?
-

What have you already tryed to solve the problem?
Investigation on phpbb.com

Description and Message
Hi.

I want to integrate Piwik into my board.

At some point during the installation, I am asked to enter a number of lines into ALL the pages.
As this is a little hard, and totally unnecessary, I think of entering the lines into overall_header.html or index.php.

Now for my question.

Would this also be sufficient for this excellent analytical tool to work with the portal as well?

grtz,
Twan

Re: Integration of Piwik into phpbb with board3

Posted: 16. June 2009 20:26
by Kevin
If i understand it correctly this is some kind of analytics / counter script.
These kind of scripts are usually hooked in the functions.php, so it gets information from every site of the forum.
What kind of integration for the portal do you want to have? Is there some kind of analytics overview addon, to be placed on index pages or whatever, you want to be displayed on the portal?

Re: Integration of Piwik into phpbb with board3

Posted: 16. June 2009 21:08
by DutchToxophilite
Kevin wrote:If i understand it correctly this is some kind of analytics / counter script.
These kind of scripts are usually hooked in the functions.php, so it gets information from every site of the forum.
What kind of integration for the portal do you want to have? Is there some kind of analytics overview addon, to be placed on index pages or whatever, you want to be displayed on the portal?
Hi Kevin.

Yes, this is an analytics/counter script. (like google analytics, but hosted by the user itself, own scripts, own DB etc.)
The website is http://piwik.org/

I just want the script to catch every user and all pages loaded.

It does not need to display anything (yet!!) I have the Piwik pages for that.

This is the code that Piwik gives to me to add to all pages:

Code: Select all

<!-- Piwik -->
<script type="text/javascript">
var pkBaseURL = (("https:" == document.location.protocol) ? "https://handboogforum.nl/piwik/" : "http://handboogforum.nl/piwik/");
document.write(unescape("%3Cscript src='" + pkBaseURL + "piwik.js' type='text/javascript'%3E%3C/script%3E"));
</script><script type="text/javascript">
try {
var piwikTracker = Piwik.getTracker(pkBaseURL + "piwik.php", 1);
piwikTracker.trackPageView();
piwikTracker.enableLinkTracking();
} catch( err ) {}
</script>
<!-- End Piwik Tag -->
I have another site, where I use Drupal, and it has an excellent integration of Piwik, it even distinguishes between different users and usergroups.

grtz,
Twan

Re: Integration of Piwik into phpbb with board3

Posted: 16. June 2009 21:24
by Marc
Add the code in overall_footer.html, right before the </body>-tag. Google Analytics does it that way and it should also work with Piwik.

Re: Integration of Piwik into phpbb with board3

Posted: 16. June 2009 22:25
by DutchToxophilite
And that also captures the portal pages?

grtz,
Twan

Re: Integration of Piwik into phpbb with board3

Posted: 16. June 2009 23:28
by Kevin
Yes, as the overall_header is also used in the portal. ;)
It covers every site of your phpbb.