Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

Resolved How to change to Opt-In in UnityAnalytics after implementing "OptOut()"?

Discussion in 'Unity Analytics' started by KANIYO, Oct 15, 2022.

  1. KANIYO

    KANIYO

    Joined:
    Nov 12, 2020
    Posts:
    3
    How to change to Opt-In in Gaming UnityAnalytics after implementing "OptOut()"?
    This is related to GDPR.

    Thanks in advance
     
    Last edited: Oct 15, 2022
  2. Julian-Unity3D

    Julian-Unity3D

    Unity Technologies

    Joined:
    Apr 28, 2022
    Posts:
    107
    To Opt-BackIn
    Unfortunately we don't yet have an easy method to opt back in.
    Three ways you can go about it are:
    1. Delete PlayerPrefs and restart application.
    2. Clear all data and cache for application.
    3. Uninstall application and reinstall.
     
    KANIYO likes this.
  3. KANIYO

    KANIYO

    Joined:
    Nov 12, 2020
    Posts:
    3
    I have done the following
    1. During playback I remove the following two Playerprefs and then stop.
    • UnityInstallationid
    • Unity AnalyticsInstallationld
    1. Play it again.
    2. I checked the playerprefs and found that the same IDs were assigned as before I deleted the playerprefs.

    Is this really Opt-BackIn?
    Verified with UnityEditor 2021.3.11f LTS.
     
  4. unity_Ctri

    unity_Ctri

    Unity Technologies

    Joined:
    Oct 20, 2020
    Posts:
    78
    Hey Kaniyo,

    Just to reiterate, we don't yet support opt-back-in - that feature is planned but isn't yet available.
    I spoke with the engineer who wrote our implementation and they narrowed it down further:

    If those items are removed, the opt out should be removed, which is analagous to opting back in.
    If you're finding things reappearing after the game has reset, then another process (perhaps even the Unity Editor itself) is restoring them - I'll have to double check if player prefs can be permanently altered during playback.
     
    KANIYO likes this.
  5. KANIYO

    KANIYO

    Joined:
    Nov 12, 2020
    Posts:
    3
    Thanks!!
     
  6. unity_Ctri

    unity_Ctri

    Unity Technologies

    Joined:
    Oct 20, 2020
    Posts:
    78
    Hey there!

    Appreciate your patience. Tested it myself, with the game in play mode and deleted the player prefs from the registry.
    After restarting the game, a new userID was generated and events were recorded, as expected :)

    Let me know if you have any further issues!
     
    KANIYO likes this.