1. We're looking for feedback on Unity Starter Kits! Let us know what you’d like.
    Dismiss Notice
  2. Unity 2017.2 beta is now available for download.
    Dismiss Notice
  3. Unity 2017.1 is now released.
    Dismiss Notice
  4. Introducing the Unity Essentials Packs! Find out more.
    Dismiss Notice
  5. Check out all the fixes for 5.6 on the patch releases page.
    Dismiss Notice
  6. Help us improve the editor usability and artist workflows. Join our discussion to provide your feedback.
    Dismiss Notice

Custom Event with no dictionary data?

Discussion in 'Unity Analytics' started by Mukabr, Jul 16, 2017 at 7:02 PM.

  1. Mukabr

    Mukabr

    Joined:
    Jun 10, 2013
    Posts:
    55
    Hello,

    I'm currently working in a project where I would like to save some custom metrics using Unity Analytics, like "PlayerCreateAccount" or "PlayerLogOut", etc...

    I read a lot about custom events, but I didn't managed to make it work with events that doesn't have data, I mean:
    Code (csharp):
    1.   Analytics.CustomEvent("PlayerCreateAccount", null);
    I waited for about two days but all data that my Analytics panel is showing, are the ones that have data included.

    [​IMG]

    (Keep in mind that "points", "coins" and "activeweapon" are the data that I used to test if the system was working)

    Well... my question is, how to track events that doesn't have parameters or variables?

    Thanks!
     
    Last edited: Jul 16, 2017 at 7:57 PM
  2. BenStoneman

    BenStoneman

    Unity Technologies

    Joined:
    Sep 12, 2013
    Posts:
    23
    @Mukabr

    I'm assuming that you just wish to see how many people created an account by counting the number of times Analytics.CustomEvent("PlayerCreateAccount", null); is called?

    You can create a segment, this will show you the total number of players that called a specific custom event. You can also show this in the Data Explorer
     
    Last edited: Jul 17, 2017 at 1:48 PM
  3. Mukabr

    Mukabr

    Joined:
    Jun 10, 2013
    Posts:
    55
    Hey @BenStoneman, thank for the reply!

    Yeah, that is exactly what I'm trying to do. I want to see how many users creat an account per day, for example.

    I'm trying to create a segment, just like you said, but like I said in the first post, my custom events without data are not being tracked.
    [​IMG]

    The dropdown only shows events that have "parameters".

    Here is my Event Manager tab:
    [​IMG]

    I might be doing something wrong, because it seems so simple to use.

    Thanks again,
    Murillo.
     
  4. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    32
    It sounds like some of your Custom Events are not being fired or perhaps returning an error. Make sure you check the result from the custom event call (type is AnalyticsResult) and/or wrap the call in a Debug.Log statement. Another technique is to use Charles Proxy to verify the events, there is more information here:

    https://support.unity3d.com/hc/en-us/articles/115002917683
     
  5. Mukabr

    Mukabr

    Joined:
    Jun 10, 2013
    Posts:
    55
    Hey @JeffDUnity3D
    The Result is saying OK, but I'm running the game in the editor and not in any device. I was just testing.
    This might be happening because i'm in editor mode?

    Thanks!
     
  6. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    32
    It would be expected to work in Editor mode also. Charles Proxy would also be expected to work, and allow you to see the events to the network. Also, you can also call without parameters without the null as in Analytics.CustomEvent("PlayerCreateAccount");
     
  7. APalomo

    APalomo

    Unity Technologies

    Joined:
    Aug 3, 2016
    Posts:
    594
  8. Mukabr

    Mukabr

    Joined:
    Jun 10, 2013
    Posts:
    55
    @JeffDUnity3D I see, I'll try to use Charles Proxy.

    @APalomo I'm currently using Unity 2017.1.0f3. I'll fill a support ticket.

    Thanks for the reply guys!