Hi,
I’m trying to gather all events generated by a specific userId, and I have set up my piwik javascript code to use the setUserId and trackEvent functions. Then, I’m trying to get all events generated today for user whose id is 27736339, and if found this API call to be the closer one to what I need:
http://mysite.com/piwik/index.php?module=API&method=Live.getLastVisitsDetails&idSite=1&period=day&date=today&format=xml&segment=userId==27736339;eventAction==publication;events>0&token_auth=XXXXXXXXXXXXXXXXXXXXXXXXXX
This returns all events by selected user but…
-
I also get all pageview, goals, and any other kind of actions, while I would only want to get the “event” actions, that is those rows with event. Is there any way I can get only those?
-
Even for those I get too much information:
<url>http://.......................</url>
<pageIdAction>92</pageIdAction>
<serverTimePretty>Vie 27 Mar 16:00:54</serverTimePretty>
<pageId>3763318</pageId>
<eventCategory>Category1</eventCategory>
<eventAction>test</eventAction>
<eventName>2203</eventName>
<icon>plugins/Morpheus/images/event.png</icon>
<timestamp>1427472054</timestamp>
I actually only need, eventCategory, eventName, eventAction and timestamp. Is there any way to choose beforehand which columns I need for each report? I understand that I can parse the contents of the XML file returned (or whatever other format I use) and skip the information I don’t need, but I’m worried if I have to get the events of a high traffic site, then this extra information will increase the load of the server and affect solution performance.
- If I remove the userId segment, then I get all events from all users. Is there any way that I can get the userID of each event?
In other words, what I would like to have is a report returning all events data (eventName, eventAction, eventCategory, timestamp, userId) from a given period/date, and be able to filter that report by userID if needed (but also be able to request all).
Thanks in advance.