Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice
  3. Dismiss Notice

Lenght of strings in custom events

Discussion in 'Unity Analytics' started by PedroGV, Jul 31, 2015.

  1. PedroGV

    PedroGV

    Joined:
    Nov 1, 2010
    Posts:
    415
    What's the lenght of strings passed as parameters' values in custom events? Like say:

    Analytics.CustomEvent("gameOver", new Dictionary<string, object>
    {
    { "stringParameter", myStringValueIsLongerTha },
    ....
    });

    I'm asking since once I want to create a segment the text field on Analytics' site caps it to 20 characters (in the example, "myStringValueIsLonge").
     
    Last edited: Aug 3, 2015
  2. PedroGV

    PedroGV

    Joined:
    Nov 1, 2010
    Posts:
    415
    Anyone?
     
  3. marc_tanenbaum

    marc_tanenbaum

    Unity Technologies

    Joined:
    Oct 22, 2014
    Posts:
    637
    Hi @PedroGV! Sorry for the delay in responding.

    You seem to be talking about a couple different things, segments vs. events.

    For Custom Events, there is a combined limit for key and value in a string parameter of 500 characters. So that shouldn't be an impediment. Segments have a name limit of 64 characters. I'm not aware of anyplace where we limit anything to 20 characters. Can you be more specific about the problem?
     
  4. PedroGV

    PedroGV

    Joined:
    Nov 1, 2010
    Posts:
    415
    No problem.

    When I attempt to create a new segment based on a custom event, I cannot set the equals (string) comparison to a value longer than 20 chars.

    Example:

    Rule 1: Event -> MyEvent -> MyParameter -> equals (string) -> "TheStringValueWithALenghtLongerThanTwentyChars"

    The latter is capped by the input field on the site to: "TheStringValueWithAL"
     
  5. marc_tanenbaum

    marc_tanenbaum

    Unity Technologies

    Joined:
    Oct 22, 2014
    Posts:
    637
    Ah, ok. Let me investigate. I don't think that should be the case, so it's possible you've stumbled across a bug. Let me take a look. Might be easy to push a fix in short order.
     
  6. marc_tanenbaum

    marc_tanenbaum

    Unity Technologies

    Joined:
    Oct 22, 2014
    Posts:
    637
    Yeah, that's definitely a mistake — my mistake, to be precise, since I wrote this code. I'll see if we can get a fix out for you today.
     
  7. PedroGV

    PedroGV

    Joined:
    Nov 1, 2010
    Posts:
    415
    Great! Thank you.
     
  8. marc_tanenbaum

    marc_tanenbaum

    Unity Technologies

    Joined:
    Oct 22, 2014
    Posts:
    637
    Fix has been pushed. Hope that solves it for you!
     
  9. PedroGV

    PedroGV

    Joined:
    Nov 1, 2010
    Posts:
    415
    Thanks!