Search Unity

AnalyticsEvent is deprecated?

Discussion in 'Unity Analytics' started by jinming_cao, Jun 2, 2020.

  1. jinming_cao

    jinming_cao

    Joined:
    Oct 2, 2019
    Posts:
    17
    I'm new to Unity analytics service. I just checked the official manual with version "2019.3", it says using "AnalyticsEvent" class to send standard events. However, I can only API script reference of "AnalyticsEvent" class prior to version "2018.2", and it says the api is deprecated. So is the manul not update-to-date? what's right way to send standard events for now?

    批注 2020-06-02 173252.png 批注 2020-06-02 173457.png
     
    Last edited: Jun 2, 2020
    krisventure likes this.
  2. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    AnalyticsResult ar = Analytics.CustomEvent(...);
    Debug.Log("Result = " + ar.ToString();

    or AnalyticsEvent.[Standard Event]

    The docs are not quite up to date.
     
  3. jinming_cao

    jinming_cao

    Joined:
    Oct 2, 2019
    Posts:
    17
    Thanks for the reply. But I don't completely get what you mean.
    So is AnalyticsEvent class deprecated or not? Should we still use AnalyticsEvent API after Unity 2018.2?
     
  4. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    Are you getting an error? I don't quite follow. Yes, it should work. By deprecated, do you mean completely removed? If it's present, then it will work. We need to update our docs as I mentioned. If this is for a new project, you might also want to take a look at https://unity.com/products/deltadna
     
    Last edited: Jun 2, 2020
  5. jinming_cao

    jinming_cao

    Joined:
    Oct 2, 2019
    Posts:
    17
    hi Jeff,

    The reason that I think the AnalyticsEvent API is deprecated is that I found the AnalyticsEvent class page was removed from the API Script Reference after v2018.2. I think can use this API with 2018.4 however I'm wondering if it's going to be removed in near future or not. I suppose it's just a missing document issue as you mentioned for now.
     
    krisventure likes this.