Database scheme

Hi!

I am looking at the database scheme, because I am looking for some specific information:

  • ID of the visit
  • ID of the visitor

Those two might be the same, but I hope not.

  • URL visited during visit / ever

I want to connect the Piwik database with another database.

I basically want to read out the ID of a visitor and give it to the other database, where other information (non personal) is stored.

E.g. I open a layer, asking a visitor if he wants to do something. If he agrees I open a new tool and I want to pass on the ID of the visitor / ID of the visit to this application.

Later I want to be able to see, which pages this specific visitor id has visited.

So I was going through the database scheme and I was looking for those items. I think I have found them, but I am not sure:

  • ID of the visit --> table piwik_log_visit : idvisit
  • ID of the visitor --> table piwik_log_visit : visitor_idcookie

With the next one I am not to sure. Remember, I am looking for the pages visited by the respective person:

  • URL visited during visit / ever --> idlink_va

I assume I will be only able to pass the visitor_idcookie on to the other application.

Then I would search for all visits (idvisit) that are connected to this visitor_idcookie and then I would look for all idlink_va that are connected with these idvisits, right?

At the end of the day I want something like this:

Visitor number xxxxxxx has visited url1, url2, url3, url4, etc.

Is this possible?

It sounds good and should work as expected.

Thanks for your reply.

I am not sure what you mean with “it sounds good”, but I assume that this means I am on the right path and identified the correct columns. style_emoticons/<#EMO_DIR#>/wink.gif

Hi.

How can I know the “visitor_idcookie” or the “id_visit” of a current visit (using php)?
Is there a function to do this ? If not, how to get theses informations ?

Thanks.