Service: getting all visitor data (custom var report) knowing the visitorID


#1

Hello :),

I want to use (or develop something that does what i want) the API of piwik to request reports like what is already done for example :
http://localhost/?module=API&method=CustomVariables.getCustomVariables&idSite=2&period=day&date=today&format=xml&token_auth=1561fd300fec360ef7cd5591d1c89f06
response:
Country<nb_visits>8</nb_visits><nb_actions>13</nb_actions><max_actions>4</max_actions><sum_visit_length>419</sum_visit_length><bounce_count>5</bounce_count><nb_visits_converted>0</nb_visits_converted>2Gender<nb_visits>8</nb_visits><nb_actions>13</nb_actions><max_actions>4</max_actions><sum_visit_length>419</sum_visit_length><bounce_count>5</bounce_count><nb_visits_converted>0</nb_visits_converted>1

But what i really want is just according the visitor ID (what we see in the table piwik_log_visit) and a date, period, get all the data cross websites for the custom variables. Something like : http://localhost/?module=API&method=CustomVariables.getCustomVariables&visitorID=xxxxxxxx&date=yyyyyyy

Could you please advice.
Thx a lot for your great job!


(Matthieu Aubry) #2

Use a custom segment and request only visitors matching the segment “visitId” Segmentation: API Reference - Matomo Analytics (formerly Piwik Analytics) - Developer Docs - v3