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

How to ignore developers in statistics. Why is not executing StartSDK() not enough?

Discussion in 'Unity Analytics' started by cr4y, Jan 11, 2016.

  1. cr4y

    cr4y

    Joined:
    Jul 12, 2012
    Posts:
    44
    Hi,

    For last week we try to exclude our developers from statistics and we are constantly failing.
    Short question is: what UnityAnalytics.StartSDK (projectId); really does, and what happens if we don't start it?
    We were sure that if we won't run it, then user won't be added to DAU, but we were wrong.

    Which brings next question: why do we need to add projectId in code and in editor window and which one is really used?

    indeks.png
    As visible on image above, we are not running UnityAnalytics.StartSDK for developers, and anyway developers are being counted in statistics. Is there any magic happening behind the scenes? Is UnityAnalytics adding users to DAU even if we do not launch StartSDK function?

    And, what is more important, how to make developers not have impact on analytics? Should we Unlink project in editor window? Will it then work for normal users? And what would happen if we would have different project id in StartSDK and different in editor window?

    It is critical for us to exclude developer statistics from analytics at all ASAP. Thanks in advance for any help.

    Cheers,
    Kris
     
  2. mpinol

    mpinol

    Joined:
    Jul 29, 2015
    Posts:
    317
    Hi @cr4y,

    What version of Unity are you using?

    Manually starting the Analytics SDK is only necessary when using the downloadable plugin, which is only available for Unity versions 4.x - 5.1. For versions 5.2 and above, with Analytics enabled in the Services window and linked to a project, the Analytics SDK is automatically started when an app is opened without you having to add any code.

    As far as keeping your developer data separated from your user data, I would suggest create two separate projects on the Analytics Dashboard and then link one project when you are testing for development and then link the other project once you are ready to create your release builds.
     
  3. cr4y

    cr4y

    Joined:
    Jul 12, 2012
    Posts:
    44
    Thanks for finding out that we were using wrong version of SDK!

    One more question: in our game we are not and will not be using any information about player gender.
    This makes me think that we could use this filter connected with Analytics.SetUserGender(gender) to separate developers from normal users.
    My idea is to after logging in to our game, set gender to female for developers and to male for real players.
    Do you see any downsides of such approach? What will happen if someone will play once as man and next day as woman, will it still add his DAU correctly? Is information about gender stored somewhere, or should we set it each time?
    It it is stored, is first time counted correctly?

    Thanks in advance for your help!
     
  4. mpinol

    mpinol

    Joined:
    Jul 29, 2015
    Posts:
    317
    Hey @cr4y,

    That is not the intended use but I do not believe there should any issues using it for this purpose. Gender is stored with the userid so you will only need to set it once to have persist in your Analytics. When a player changes their gender the old value is just overwritten, but they will still be considered the same user so you should not see any changes in DAU.
     
    cr4y likes this.
  5. cr4y

    cr4y

    Joined:
    Jul 12, 2012
    Posts:
    44
    Thanks for fast answer!

    Locally, in cloud or both?

    Please tell me if I am correct:
    If I have launched game as male, then (same day) as Female, then:
    • DAU = 1
    • DAU filtered by males = 0
    • DAU filtered by females = 1
    Am I right?
     
  6. mpinol

    mpinol

    Joined:
    Jul 29, 2015
    Posts:
    317
    Hey @cr4y,

    Unity versions 5.3 and below would have gender be overwritten locally and in the cloud. For 5.4 it will only be overwritten in the cloud as this will no longer be stored locally.

    Yes this is correct!
     
  7. cr4y

    cr4y

    Joined:
    Jul 12, 2012
    Posts:
    44
    Thank you!