Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Custom Event Parameters are sent in the wrong order compared to the Dictionary variable

Discussion in 'Unity Analytics' started by PlaystateStudios, Feb 27, 2017.

  1. PlaystateStudios

    PlaystateStudios

    Joined:
    Aug 12, 2015
    Posts:
    3
    Hi,

    We've just starting using Unity Analytics today and i have one little concern, when making a custom events, i setup the dictionary variables to be as meaningful as possible in both names and order,
    example :


    However the data got sent in a different order :


    Why is "levelName" is not the first one ?

    PS:
    I still didn't got these events in the data dashboard these are just the test results.
    Also the level name is a key "categorizer" for us, so we probably gonna use that to sort the data.

    Thanks
     
  2. ap-unity

    ap-unity

    Unity Technologies

    Joined:
    Aug 3, 2016
    Posts:
    1,519
    @PlaystateStudios

    This is correct; we don't preserve the order of parameters. Is there a particular reason you need the parameter names in a certain order? The raw events are only available via Raw Data Export, so that's the only place the order will be visible (besides the Validator). And even when parsing the Raw Data, you can do so by the event name rather than the order.

    The Validator should show your event data as you send the events. Data will only be available in the dashboard after it has been aggregated and processed. This will typically take about 4 hours from the point when you first visit the dashboard.

    Another thing worth mentioning, we currently don't support comparing parameters in a single event. For example, you can see the number of GemsCollected in a day and you can see the count of each levelName for each day. However, you won't be able to see the number of GemsCollected per each level. This is a limitation of our current backend, which we are working to improve.

    In the meantime, a possible workaround (in addition to using Raw Data Export and manually analyzing the data yourself) is to append the level name (or whatever "categorizer" you need) to the name of the custom event.

    In your example, you can make the following modification:
    Code (CSharp):
    1. MyUnityAnalytics.SendCustomEvent(eventName + "_" + levelName, dictionnary);
    This may not be the best solution, depending on the number of levels you have, but it is an option.
     
    PlaystateStudios likes this.
  3. PlaystateStudios

    PlaystateStudios

    Joined:
    Aug 12, 2015
    Posts:
    3
    Yup that's exactly what i ended up doing,

    We currently have 30 levels, that should be fine right ?

    thanks!
     
    ap-unity likes this.