Page 2 of 2

Re: new plugin: serendipity_plugin_piwik

Posted: Sat Oct 19, 2013 8:22 pm
by onli
Ok, if you got such a link, you can get the id by using PAT_ARCHIVE, PAT_ARCHIVES or PAT_PERMALINK (I'm always mixing those up). If you have the id, with that you can get all other entry data by calling

Code: Select all

serendipity_fetchEntry('id', $id)
I think that this method should work with or without url rewriting.

Re: new plugin: serendipity_plugin_piwik

Posted: Wed Oct 23, 2013 6:27 pm
by Timbalu
bernd_d wrote: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.
Hi Bernd
I needed to wait for the new week to get some new results... :)
This definitely were links brought-in by google and other SE. It is now a mixture of single entry links (like your ones) and all sort of of archives summary links (monthly/daily). I just return that here, so this does not seem to be a problem of the plugin itself.
I disabled the sidebar plugin for the public again, since it took to many ressources on that quite busy site, and also did not make too much sense there.
Just as a side note, when starting, I had to make it work by

Code: Select all

            // take pagetitles from second array and write it into first one
            @ini_set("memory_limit",'64M');

Re: new plugin: serendipity_plugin_piwik

Posted: Wed Oct 23, 2013 9:49 pm
by bernd_d
Timbalu wrote:I needed to wait for the new week to get some new results... :)
Will be better with Piwik 2.0. As you can see it on my page, then you will be able to query "last x days" instead of current week. It doesn't work within Piwik 1.0 because of some API-bugs. :)
Timbalu wrote:Just as a side note, when starting, I had to make it work by

Code: Select all

            // take pagetitles from second array and write it into first one
            @ini_set("memory_limit",'64M');
64M memory for this little array with 5 entries?!? Or did you use a larger number of entries (plugin-settings) that had to be fetched?

Re: new plugin: serendipity_plugin_piwik

Posted: Thu Oct 24, 2013 9:47 am
by Timbalu
Do you mean those two core file changes. I did use them already.

And about the memory limit, this wondered me too. I surely started with lower tries, until the error was gone. Today I think, it was because the sidebar compilation and piwik in the background raised up the used memory so high, that I had to reserve some more than origin necessary to the plugin.

Re: new plugin: serendipity_plugin_piwik

Posted: Thu Oct 24, 2013 12:51 pm
by bernd_d
Timbalu wrote:Do you mean those two core file changes. I did use them already.
Yes, this is what i mean.
Timbalu wrote:And about the memory limit, this wondered me too. I surely started with lower tries, until the error was gone. Today I think, it was because the sidebar compilation and piwik in the background raised up the used memory so high, that I had to reserve some more than origin necessary to the plugin.
I have made a new 0.4.0 with some optmizations at the piwik-query-url, hope this helps a little bit.

Code: Select all

0.4.0
* with Piwik v2 it is possible to use last x days for most
  read entries instead of current week
* some optimizations for fetching most read entries (smaller arrays)