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

Unity IAP without Analytics for kids games?

Discussion in 'Unity IAP' started by coshea, Jun 3, 2019.

  1. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    Yes, you will want to disable the services at runtime, it works.
     
    korimako likes this.
  2. coshea

    coshea

    Joined:
    Dec 20, 2012
    Posts:
    319
    I have turned off everything in the services tab and deleted any analytics code from my apps now. They've gone through approval fine.
     
  3. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,256
    It does not seem like the unified Unity IAP 3.0.0 package requires the "In App Purchasing" and "Analytics" sections in the services tab to be enabled anymore. At least in my tests (on Standalone), purchases worked fine without enabling anything in the services tab.
     
  4. korimako

    korimako

    Joined:
    Aug 10, 2013
    Posts:
    40
    upload_2021-4-4_9-57-24.png

    I don't see it. How do you use IAP without using services?

    Thanks!
     
  5. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,256
    @korimako On your screenshot in the middle, there is a barely visible, greyed out "OFF" displayed for In-App Purchasing Settings. So I guess you did not enable the IAP Services ;) You obviously still need the Package Manager files (right side in you screenshot) for Unity IAP to work.
     
    korimako likes this.
  6. korimako

    korimako

    Joined:
    Aug 10, 2013
    Posts:
    40
    Yes I saw the OFF, and worked out the awesome Unity UI with reverse calls to action - LOL. But what I probably should have highlighted was this:

    upload_2021-4-5_4-19-17.png

    As far as I can tell you still have to manually switch off analytics at runtime. Am I still missing something?

    How did you enable IAP without the services tab? Is this a legit route?
     
  7. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,256
    That's the thing, I did not "enable" Unity IAP. Which means that Analytics does not need to be enabled either. I just imported the Unity IAP files from the Package Manager and purchases still worked fine.

    It seems that the Unity IAP tab under services is only required if you want to send receipt data to Unity Analytics.
     
  8. dmitry-K

    dmitry-K

    Joined:
    Apr 2, 2014
    Posts:
    26
    Hi. How did you did this??
     
  9. ap0uche

    ap0uche

    Joined:
    Sep 1, 2018
    Posts:
    3
    Our app is in exactly the same scenario (<13 with IAP). We had rejections in the past for using analytics (before IAP), can you confirm that it is possible to use Unity IAP without analytics ? Will this be accepted by Apple ? What are the steps to to fully disable unity analytics ? Thanks
     
    konsti1994 likes this.
  10. JeffTheCampbell

    JeffTheCampbell

    Joined:
    Jul 11, 2018
    Posts:
    35
    What steps are still necessary for ensuring analytics are disabled when using Unity IAP so that the App Store does not reject an app?
     
  11. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    You would want to ensure that legacy Analytics is removed from the project ("Analytics Library" in Package Manager) and consider calling this method https://docs.unity3d.com/Packages/c...csService_SetAnalyticsEnabled_System_Boolean_ To verify that nothing is being sent, use Charles Proxy https://support.unity.com/hc/en-us/articles/115002917683-Using-Charles-Proxy-with-Unity
     
  12. FabioTB

    FabioTB

    Joined:
    Nov 4, 2022
    Posts:
    3
    Hello there, I've been following the thread here and other posts. It is now a bit unclear how to achieve this, so to clarify, the recommended approach for removing Analytics while having Unity IAP (we are trying to remain compliant with GDPR and COPPA) would be:


    Code (CSharp):
    1. [RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.BeforeSceneLoad)]
    2.     static void DisableAnalytics()
    3.     {
    4.         Analytics.initializeOnStartup = false;
    5.         Analytics.enabled = false;
    6.         Analytics.limitUserTracking = true;
    7.         Analytics.deviceStatsEnabled = false;
    8.         PerformanceReporting.enabled = false;
    9.         AnalyticsService.Instance.SetAnalyticsEnabled(false);
    10.     }
     
    Last edited: May 9, 2023
  13. Yannick_D

    Yannick_D

    Unity Technologies

    Joined:
    Feb 21, 2022
    Posts:
    226
    Hello FabioTB,
    Since IAP 4.7.0, Analytics is no longer a dependency.
    Just make sure the Analytics package isn't installed (remove it if it's there) and that the Legacy Analytics is off (if you had an existing project that previously used it) and you should be good!
     
    FabioTB likes this.
  14. FabioTB

    FabioTB

    Joined:
    Nov 4, 2022
    Posts:
    3
    Thanks, Yannick_D! I'll let the team know. We are using something similar to the sample above in the meantime.
     
  15. akingdom

    akingdom

    Joined:
    Mar 30, 2013
    Posts:
    15
    For anyone still needing the script...
    https://gist.github.com/akingdom/bc9dba0d61e6a60546a877c4ac81c16f