Finding URLs belonging to a visit



I want to create reports directly from Piwik database. For example, I want to query URLs that a user visited. However, it seems the URLs are not stored as such but as hash-values instead (in table *_log_action). And the name field contains the title of the page, not the URL.

As a feature I suggest the URLs are saved in the table *_log_action. And how can I access the URLs now? Is there somewhere a mapping between URLs and hashes?

Thanks in advance! I find Piwik absolutely great!

(Matthieu Aubry) #2

We recommend you use the API instead, eg. Real Time Analytics - Analytics Platform - Matomo

You will find doc about database at Database schema: API Reference - Matomo Analytics (formerly Piwik Analytics) - Developer Docs - v3


Thanks a lot for your quick answer, Matt!

I could not find the URLs in the API either. To me it seems that the API responses reflect quite closely the underlying DB structure. So, how can I find which hash corresponds to which URL? In API or elsewhere.

And as a feature idea, I still thing it’s a good idea to include the URL in the table too. It makes things a lot easier.


In the API, the best I could find is:

If I could get this information per any “visitID” it would be great. But unfortunately the mentioned API call has only these parameters:
(idSite, period = ‘’, date = ‘’, segment = ‘’, countVisitorsToFetch = ‘’, minTimestamp = ‘’, flat = ‘’, doNotFetchActions = ‘’)

However, I have good tools for creating reports directly from DB so that would be the ideal way to solve this issue.

(Matthieu Aubry) #5

Use segmentation, ie. &segment=visitId==XXXXXXX

it will return only this visitor and all its page views and URLs

(system) #6