new plugin: serendipity_plugin_piwik
new plugin: serendipity_plugin_piwik
I have made a small plugin for piwik. Currently it doesn't do more than showing the most viewed entries of current week in sidebar. (last xx days is currently not possible because of this bug in piwik)
Be warned: I'm not a programmer and my english isn't better
Would be nice if someone of the professional users could take a look at it.
I try to include some more features next time.
Be warned: I'm not a programmer and my english isn't better
Would be nice if someone of the professional users could take a look at it.
I try to include some more features next time.
Last edited by bernd_d on Wed Jul 10, 2013 1:54 pm, edited 1 time in total.
Re: new plugin: serendipity_plugin_piwik
Hi Bernd,
I installed your plugin on my local machine, and it works just fine
Some remarks:
serendipity_plugin_piwik.php
Regards
- Mattsches
I installed your plugin on my local machine, and it works just fine
Some remarks:
- Configurable "site_id" would be nice
- Use PEAR HTTP_Request class for calling Piwik API (and try/catch exception handling)
- Require PHP5.* and a newer S9y version (not sure which one, though)
serendipity_plugin_piwik.php
Regards
- Mattsches
Re: new plugin: serendipity_plugin_piwik
Looking at the Piwik API docs, there's actually pretty cool stuff in there. Seems like you can even get finished image graphs from Piwik.
On the other hand, a lot of the API methods aren't probably too useful for a blog sidebar. But maybe we can add some cool features in future versions of this plugin?
On the other hand, a lot of the API methods aren't probably too useful for a blog sidebar. But maybe we can add some cool features in future versions of this plugin?
Re: new plugin: serendipity_plugin_piwik
Things i want to include:
Another thing that would be nice to have is an event-plugin for annotations, which saves entry-title to Piwik, if entry is published
- last searched keywords (from search engines)
- tracking code (only a field for including java script from piwik)
- number of visitors in the last xx minutes/hours
Another thing that would be nice to have is an event-plugin for annotations, which saves entry-title to Piwik, if entry is published
Re: new plugin: serendipity_plugin_piwik
Ok, here is 0.3 if my plugin
ChangeLogREADME.markdown wrote:This is just a small sidebar-plugin which can connect to your Piwik-installation. If you want to use it, you have to set up an user who has at least read-access to piwik. Within user-managment of piwik you can create a new one, if you don't want to use admin.
If you don't need one part of the statistics, just disable it.
If you want to change the order of output, install the plugin twice, it's stackable Now, you can can enable or disable any part of every instance until you are happy
Code: Select all
0.3
* renaming of language strings
* included some live-statistics
0.2
* some changes and optimisations by mattsches, thanks!
0.1
* first try, a lot of things could behave wrong
Last edited by bernd_d on Sun Nov 03, 2013 7:41 pm, edited 1 time in total.
Re: new plugin: serendipity_plugin_piwik
Only a small update...
Code: Select all
0.3.1
* included some debug-logging
* included "known bugs" into README.markdown
Last edited by bernd_d on Sun Nov 03, 2013 7:41 pm, edited 1 time in total.
Re: new plugin: serendipity_plugin_piwik
Is it possible to use this plugin beside Google Analytics, just for a comparison?
Re: new plugin: serendipity_plugin_piwik
I don't see any problems if you want to use both plugins. My plugin only gives some output from piwik, it doesn't track your visitors (at the moment, perhaps in future versions).
Re: new plugin: serendipity_plugin_piwik
I compared analytics and piwiki and the result is similar. I greet all
Re: new plugin: serendipity_plugin_piwik
Bernd,
the most n current pages in week do not display the real pages. It links to /archives/n/ which is all entries by date, or (like the last) entries by month, not the current title only, eg.
Is that a mistake, or did you want it to display like that? If you can answer this question by first, I am will try to correct this. Is that a limitation by piwik? Maybe then we should push this to additional plugins?!
the most n current pages in week do not display the real pages. It links to /archives/n/ which is all entries by date, or (like the last) entries by month, not the current title only, eg.
Code: Select all
<li><a href="/archives/2013/10/16.html" title="4 views">the title | the blog name</a></li>
<li><a href="/archives/2013/10/15.html" title="2 views">the title | the blog name</a></li>
<li><a href="/archives/2013/10/14.html" title="1 views">the title | the blog name</a></li>
<li><a href="/archives/2013/10/18.html" title="1 views">the title | the blog name</a></li>
<li><a href="/archives/2013/08.html" title="2 views">the title | the blog name</a></li>
Regards,
Ian
Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
Ian
Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
Re: new plugin: serendipity_plugin_piwik
Hm...i can't reproduce this. As you can see at https://bernd.distler.ws, the articles are linkend and titled as they should.
Titles and URLs are comming from piwik-API and just merged into one array. The output should be the same as in Piwik-dashboard. How does this look like, in your case?
Titles and URLs are comming from piwik-API and just merged into one array. The output should be the same as in Piwik-dashboard. How does this look like, in your case?
Re: new plugin: serendipity_plugin_piwik
Yes. I see its different on your blog, strange..., but there still is a bug, see
The last two are displaced.
Beside that, why could that be that I do not get the real titles..? This is an old blog with a very new piwik counter, maybe these are links come in by search engines based on the calender day/month links...
Code: Select all
<li><a href="http://bernd.distler.ws/archives/251-Excel-Zahlen-in-0,5er-Schritten-runden.html" title="92 Aufrufe">Excel: Zahlen in 0,5er Schritten runden</a></li>
<li><a href="http://bernd.distler.ws/archives/1329-TrueCrypt-Container-auf-iPhone-oeffnen.html" title="47 Aufrufe">TrueCrypt-Container auf iPhone öffnen</a></li>
<li><a href="http://bernd.distler.ws/archives/5-AudioConverter-unter-Linux.html" title="16 Aufrufe">AudioConverter unter Linux</a></li>
<li><a href="http://bernd.distler.ws/archives/16-Doppelseitig-scannen-und-als-PDF-speichern.html" title="11 Aufrufe">Beelitz-Heilstätten</a></li>
<li><a href="http://bernd.distler.ws/archives/335-Beelitz-Heilstaetten.html" title="11 Aufrufe">Doppelseitig scannen und als PDF speichern</a></li>
Beside that, why could that be that I do not get the real titles..? This is an old blog with a very new piwik counter, maybe these are links come in by search engines based on the calender day/month links...
Regards,
Ian
Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
Ian
Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
Re: new plugin: serendipity_plugin_piwik
Oh, you are right. Seems, there is different name-sorting for urls and pages-titles if they have same view-count I didn't notice this until now.Timbalu wrote:Yes. I see its different on your blog, strange..., but there still is a bug, see
...
The last two are displaced.
Main problem is, that Piwik-API only delivers page-titles OR page-urls. You never get both values in one array Within the plugin i try to make two different fetches from api and merge them into one array.Timbalu wrote:Beside that, why could that be that I do not get the real titles..? This is an old blog with a very new piwik counter, maybe these are links come in by search engines based on the calender day/month links...
In your case it could be, that the api-arrays completely differ from my one.
Best solution would be to get page-url from piwik at grab page-titles from s9y-database, but i don't know how this could be done easily.
Re: new plugin: serendipity_plugin_piwik
What data do you have, and which do you want? Maybe I can help.
Re: new plugin: serendipity_plugin_piwik
In my case, i get URLs like /archives/67-D-Link-DNS-323-im-Test.html from piwik and for output i would need page-title from database. Could be possible with article-id i hope, but it would be needed for different kind of url-rewriting.
But this only would solve my problem, i don't know why Timbalu gets different links/output. This need to be checked within piwik-dashboard and compared to output of the api.
But this only would solve my problem, i don't know why Timbalu gets different links/output. This need to be checked within piwik-dashboard and compared to output of the api.