API function Referers.getKeywordsForPageUrl in V1.5


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:

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,

It works fine for us in 1.5

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

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.


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.

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


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.

Can you update to piwik 1.5.1 ?

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

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.

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?

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

PDO support enabled
PDO drivers mysql, sqlite, sqlite2

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?

Are you using any other Piwik plugins?

Otherwisel please install 1.6 RC in a a fresh empty database.
Then it will work!

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.