API function Referers.getKeywordsForPageUrl in V1.5


#1

Hi,

I am playing with API functions from section “Module Referers” in version 1.5 (update was done in shell from 1.4). First I tried example of Referers.getKeywords, that works fine.

Now I tried Referers.getKeywordsForPageUrl example:
http://xy.zz/piwik/index.php?module=API&method=Referers.getKeywordsForPageUrl&idSite=1&period=day&date=yesterday&url=http://forum.piwik.org/&format=xml&token_auth=xxx

The token_auth is set with my value, but url is set wrong. I think the example could contain right domain name. But that is not the point. So I replace wrong url with my domain name of idSite. Then I get following error: message=“SQLSTATE[23000]: Integrity constraint violation: 1052 Column ‘idvisit’ in field list is ambiguous”

Do you see any fault of me?
Does it work in your installations?
Thank you for your answers.

Have a nice day,
Alex


(Matthieu Aubry) #2

It works fine for us in 1.5

Can you please make sure all files are uploaded correctly,
other API functions work well ?


#3

Hi Matt,

I downloaded zip from your server to my server, then I extract it with unzip. Now I copied config file from previous backup to this new version. Then I started the update process via SSH and it was executed successful.
Other functions are working well in api. e.g. Referers.getKeyword

Can it be a problem of upgrade?
Thank you for your help.


#4

Hi,

does this function Referers.getKeywordsForPageUrl work for you all?
I installed a new version 1.5.1 with a new database today.

But I get same error again.

Please could you post a URL, that is working for you?
Thank you in advance.


(JulienM) #5

From http://piwik.org/docs/analytics-api/reference/ :

http://demo.piwik.org/?module=API&method=Referers.getKeywordsForPageUrl&idSite=7&period=day&date=today&url=http://forum.piwik.org/&format=xml&token_auth=anonymous


#6

Hi Julien,
thank you for your example.

I tried it in my new installation, but I get same error:


Do you have any idea?
Thank you in advance.


(JulienM) #7

Can you update to piwik 1.5.1 ?


#8

I installed 1.5.1 with a new empty database.
Should I run update script? Or what do you mean?
Thank you in advance.


(JulienM) #9

I proposed to update to Piwik 1.5.1 because you mentioned in your first post that you are running Piwik 1.5

If you install from scratch Piwik 1.5.1 then there is no need to run an update script.

Could you detail your environment, webhost, php version, mysql version and so on.


#10

Hi Julien,
sorry for this misunderstanding.

I tried this function in version 1.5 (an updated version from 1.2 to 1.5 and current 1.5.1) and it was not working.
This function does not work in current updated version 1.5.1 too.

So I installed a second one from zip version 1.5.1 with a new empty database.
But it does not work too.

mysql Ver 14.7 Distrib 4.1.22, for pc-linux-gnu (x86_64) using readline 4.3
PHP Version 5.2.17

Does it help? Or what else do you need?


(JulienM) #11

Which database extension do you use for PHP, pdo, pdo_mysql, mysqli ?


#12

PDO
PDO support enabled
PDO drivers mysql, sqlite, sqlite2

pdo_mysql
PDO Driver for MySQL, client library version 4.1.22

PHP compile options:
…-with-mysql=/usr/lib/mysql’ ‘–with-mysql-sock=/var/run/mysqld/mysqld.sock’ ‘–with-mysqli=/usr/bin/mysql_config’ ‘–without-pdo-dblib’ ‘–with-pdo-mysql=/usr’ ‘–without-pdo-odbc’ …

Does it help?


(Matthieu Aubry) #13

Are you using any other Piwik plugins?

Otherwisel please install 1.6 RC in a a fresh empty database.
http://forum.piwik.org/read.php?2,81827
Then it will work!


#14

Hi Matt,

no, I am using no further plugins.
But the update from 1.5.1 to 1.6 works perfectly :slight_smile:

I tried the update on my previous 1.5.1 installation, that works.
And after this I tried the update of my old 1.4 updated version too, and this was done without any problem.

Now getKeywordsForPageUrl is working.
Thank you very much.