matomo-org / matomo-sdk-android

SDK for Android to measure your apps with Matomo. Works on Android phones, tablets, Fire TV sticks, and more!
BSD 3-Clause "New" or "Revised" License
390 stars 162 forks source link

passing values with TrackMe #302

Closed SepidehAkbarinezhad closed 3 years ago

SepidehAkbarinezhad commented 3 years ago

I 'm using matomo to log the events in my android app.I use the below codes when I have one string and one float to pass and it works well : TrackHelper.track() .event("category_name"," event_name") .name("user_name") .value(user_Id) .with(tracker); and I can see the log in Visitors>visits log as below: category_name - event_name - user_name [100]

Now my question is here : when I want to pass more values as I get from documentation I can use TrackMe . so I change my code to this :

TrackHelper.track(new TrackMe() .set("itemName", "item_name") .set("itemId", itemId)) .event("category_name", "event_name") .name("user_name") .value(user_Id) .with(tracker); but as a result nothing changes in the event that I see in my matomo panel . there is nothing about the values I pass with TrackMe. Am I doing something wrong? could you please guide me that how can I pass more values to matomo?

d4rken commented 3 years ago

You can find the code for the TrackHelper.EventBuilder here: https://github.com/matomo-org/matomo-sdk-android/blob/9c3ccd2ac5070a3147f75bc4c461510f356bacf6/tracker/src/main/java/org/matomo/sdk/extra/TrackHelper.java#L215-L220

an event can only have one name, and one value.

Maybe you are looking for Custom Dimensions