Documentation

​
​

Development

User Acquisition

Monetization

Industry

Analytics

Unity SDK

Client API

Analytics

LiveOps
​
​
Analytics
  • Overview
  • Get started
  • Pricing
  • Concepts
  • Tutorials
  • Reference
  • Privacy and consent
    • Privacy overview
    • Apple privacy manifest
    • Google data safety
    • Manage data privacy when using the SDK
      • SDK compliance: Opt in
      • SDK compliance: Opt out
  • FAQ
  1. Unity Analytics
  2. Manage data privacy with the SDK

Opt-out compliance

Understand how to implement opt-out compliance for the Analytics SDK to comply with General Data Protection Regulation and California Consumer Privacy Act requirements.
Read time 1 minute
Last updated 8 months ago

All versions of the Analytics SDK provide compliance mechanisms consistent with known regulatory customers and guidance including General Data Protection Regulation (GDPR) and California Consumer Privacy Act (CCPA).

Unity 6.2 and later with Analytics SDK 6.1 and later

The Analytics SDK is controlled by the Developer Data framework
EndUserConsent
API, present in the Unity Engine from 6.2 onwards. To start or stop data collection, you must set the consent status for
AnalyticsIntent
to
Granted
or
Revoked
respectively.
For specific information about granting consent with the
EndUserConsent
API, refer to Developer Data framework.

Unity 6.1 and earlier, or Analytics SDK 6.0 and earlier

In regions that require you to provide an opt-out, you must provide your own logic to determine whether the player has opted out. You may call
AnalyticsService.Instance.StartDataCollection()
to start the SDK if the player hasn't opted out, otherwise you shouldn't call it and the SDK remains dormant.
Important
Unity Analytics requires you to implement a privacy solution separate from Unity Ads. If you're using both Unity Ads and Analytics, the Unity Ads opt-out mechanism does not apply to both services.
async void Start(){ await UnityServices.InitializeAsync(); if (playerHasOptedOut) { // Do nothing, leave the SDK off } else { AnalyticsService.Instance.StartDataCollection(); }}
Note
these API methods changed in version 5.0.0 of the SDK. Please ensure you have the latest version of the SDK installed!

Copyright © 2026 Unity Technologies
LegalPrivacy PolicyCookiesDocumentation Terms of UseDo Not Sell or Share My Personal InformationYour Privacy Choices (Cookie Settings)

"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S and elsewhere (more info here). Other names or brands are trademarks of their respective owners.

Some pages are machine-translated for convenience, and may contain inaccuracies. In the event of conflicting information, the English version is authoritative.

  • On this page
    • Unity 6.2 and later with Analytics SDK 6.1 and later

    • Unity 6.1 and earlier, or Analytics SDK 6.0 and earlier


Report a problem with this page