Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only.

    Please, do not make any changes to your username or email addresses at id.unity.com during this transition time.

    It's still possible to reply to existing private message conversations during the migration, but any new replies you post will be missing after the main migration is complete. We'll do our best to migrate these messages in a follow-up step.

    On July 15, Unity Discussions will become read-only until July 18, when the new design and the migrated forum contents will go live.


    Read our full announcement for more information and let us know if you have any questions.

Custom Event Details: All params have same value

Discussion in 'Unity Analytics' started by RobinBGbanga, Jan 27, 2015.

  1. RobinBGbanga

    RobinBGbanga

    Joined:
    Oct 20, 2014
    Posts:
    16
    Hi Unity Analytics team!

    We've started receiving the first custom events data. I've set up one event that tracks the coordinates and another value ("territorySize") of whenever a player starts a match in the game. The data comes in, but it seems that all params are exactly the same.

    I've debugged locally to make sure it's not our system, of course. the data is submitted correctly and looks like this:

    StartMatch
    Longitude: 47.68057
    Latitude: 8.635249
    TerritorySize: 5

    However, as you can see in the attached screenshot, all params seem to be exactly the same (for example 240 longitude, 240 latitude, 240 territorySize). Is there some sort of misunderstanding on my side, or might this be a bug?

    My call looks as follows:

    public static void StartMatch(float lon, float lat, int territorySize) {
    EventWrapper.RegisterEvent("StartMatch",new Dictionary<string, object> {
    { "Longitude", lon },
    { "Latitude", lat },
    { "TerritorySize",territorySize}​
    }
    );​
    }

    public static void RegisterEvent (string eventName, Dictionary<string,object> eventData) {
    if(logToUnityAnalytics) {
    UnityAnalytics.CustomEvent(eventName, eventData);​
    }
    LogEvent(eventName,eventData); ​
    }​

    Just tell me if you need further info, I'd be glad to help where I can.
     

    Attached Files:

  2. chris-unity

    chris-unity

    Joined:
    May 17, 2014
    Posts:
    2
    Hi Noshire1,

    Your integration is correct. The chart is showing the "count" metric, which is the number of occurrences of each parameter name attached to the "StartMatch" event. In this example, "latitude", "longitude" and "territorysize" each occurred 240 times on 1/19/15. The system counts, sums and averages all numeric parameters attached to a custom event. This can be confusing when the numeric parameters provided are spatial coordinates.

    Please let us know if you have any further questions.

    Chris
     
  3. RobinBGbanga

    RobinBGbanga

    Joined:
    Oct 20, 2014
    Posts:
    16
    Thank you for the quick reply Chris!

    I do have one follow-up question. How would I best retrieve the raw data I'm sending? I'd love to retrieve a json, csv or anything that contains all data points together with the parameter values, like:

    StartMatch
    Longitude: 47.68057
    Latitude: 8.635249
    TerritorySize: 5

    I see that the data explorer visualization might not be suited for this kind of input, but if I got the raw data, we could produce our own heat maps. That can be done via our own server as well, of course, but I think the more use cases one tool covers, the better.

    Also, am I correct in my understanding that the tool only displays the amount of occurrences of a specific parameter being sent, but not the total of the actual parameter values? I'm just a bit confused, since the "Custom Event Details" page wouldn't make much sense then (given that for each specific event, it usually submits all its params every time, just with different values). So if "StartMatch" occurred 240 times, it comes as no surprise that its three params, "lat", "lon" and "territorySize", have also been submitted 240 times each.

    Thanks!

    Robin
     
  4. angeloferro

    angeloferro

    Moderator

    Joined:
    Sep 12, 2014
    Posts:
    105
    Hey @Noshire1,

    Data Explorer will show either the count, sum or average of numeric parameter values (for non-numeric parameter values, it will only show you the count). For your specific use case, seeing the count/sum/average of the actual parameter values isn't that useful, but rest assured we are actively working to improve this feature to help address your use case (and the other use cases posted in this forum).

    We'll make sure to keep the community updated on our progress :)

    Cheers,
    -Angelo