Search Unity

Analytics Custom Events Recording Everything as Strings

Discussion in 'Unity Analytics' started by ferretnt, Nov 16, 2017.

  1. ferretnt

    ferretnt

    Joined:
    Apr 10, 2012
    Posts:
    412
    ^^Title should say "Standard Events"

    As far as I can see, every standard event parameter is getting recorded as a string, even if it is, for example, an integer.

    I think this is because in AnalyticsEventParam.cs:69, the code returns m_Value.propertyValue, which is always a string.

    There is also a bunch of code further down that was clearly intended to parse the string into the correct type, but it's commented out. Is there a reason this is commented out? I also see in TriggerRule.cs a bunch of Test functions related to typed values with a comment // TODO: Fix this.

    Are there any plans to fix it as it's very important that our analytics data is recorded with correct types. This makes analyzing raw data for standard events quite frustrating as everything is a string, e.g. this event below, which really has two ints colourIdx and paletteIdx as params.

    "name":"select_colour","custom_params":{"colourIdx":"9","paletteIdx":"35"}

    (Although side note: I've noticed in the past, haven't checked for a year, that Unity Analytics seems to be VERY agressive about converting parameters to ints/floats even if they are sent as strings - I think there was a case where we were reporting something as a string because we wanted individual instance counts not averages/counts, and Unity's dashboards still seemed to report the parameter as for an int.)
     
    Last edited: Nov 16, 2017
  2. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    I will check into this, and keep you updated.
     
  3. ferretnt

    ferretnt

    Joined:
    Apr 10, 2012
    Posts:
    412
    Cool, thanks (although no rush as I've already fixed it here, hence my other post about hoping this stuff will remain as editable source :) )