Opt-Out Scenarios

opt_out.jpg

Introduction

In some cases, app owners may not be permitted to fully track their users and need to opt them out from tracking. This may happen due to age restrictions, GDPR requirements etc.

Opting-out users may relate in different scenarios to all data or just the in-app events data, per session or per the installation.   

 Important!

Follow the correct flow per the opt-out scenario as detailed below. Otherwise, the collection of your app's attribution data may not be performed correctly.

Scenarios

1. Opt-Out on Installation

coppa_compliant_appsflyer.png

When: Upon the first launch (e.g., for COPPA compliance)

What: The app requires the user's agreement to perform tracking through-out all sessions. If the user consents to tracking (e.g., user above a certain age) the app calls the SDK's startTracking method. Otherwise, the startTracking method should simply not be called

 Warning

Important! DON'T use stopTracking if startTracking was never called.

How: The startTracking method should always be called at the session start of opted-in users, but shouldn't be called for opted-out users. In addition, in-app events cannot be sent for users who have never opted-in, as they are regarded as coming from unknown users and go to organic.

Therefore, for apps, we recommend that enable Installation opt-out, has a permanent flag parameter that shows if startTracking was called beforehand or not. This flag should ALWAYS be checked before calling startTracking or sendEvent methods are called.

 Example

com.carefulapp requires users to register upon installing. The form includes a check box saying "I'm over 13". Dev the developer added a flag called is_tracking, which becomes true only for registrations that have this box checked, and then activates startTracking.

Code sample example here.  

2. Session Opt-Out

When: Upon every app launch 

What: Every session the app requires the user's agreement to perform tracking during that session only

How: For the Session opt-out scenario the first SDK call comes after the user agrees or disagrees to be tracked.

If the user agrees to be tracked then startTracking method should be called.
If the user disagrees to be tracked then stopTracking method should be called. 

 Example

com.adultsplay is a casual gaming app for adults over 18 years old. It doesn't require users to register, but it does require their confirmation of age with every new launch. Sessions where the users confirm they're over 18 get the full gaming experience and are tracked, while otherwise no tracking is carried out.

Dev the developer added a flag called is_tracking, which becomes true only for sessions that confirm age 18. ONLY if this flag is true AND the new session is NOT confirmed for age, the stopTracking method is called. 

3. One Time Opt-Out

OpenGDPR-logo-BLK.png

When: Anytime (GDPR)

What: The app owner collects attribution and post-install data. The user requests to stop further collection of data, e.g., as required by GDPR

How: DON'T call startTracking and then directly call stopTracking!

Instead, on the first launch use the startTracking method with the requestListener. Upon successful completion, in the callback function call stopTracking

On every following session don't call the startTracking API. 

 Example

com.watchmegrow is a plant growth viewing app, where users watch growing plants and mobile ads. The app collects all owner wants to keep all in-app activities data secret.

On the first launch, Dev the developer calls startTracking method with the requestListener. When receiving a successful completion, calls stopTracking from the callback function and sets a persistent parameter is_first_launch to false. On the following launches Dev checks if is_first_launch is false, and then skips startTracking.

Code sample example here

4. Track Install and Anonymize

When: Upon the first launch 

What: The app owner collects all attribution data, but wants to collect all further information, such as in-app events or sessions data, as unattributed organic data. Post-installation, all device IDs are anonymized when sent to AppsFlyer from the SDK.

How: DON'T call startTracking and then directly call stopTracking!

Instead, on the first launch use the startTracking method with the requestListener. Upon successful completion, in the callback function call setDeviceTrackingDisabled(true).  

 Example

The app owner of the com.munistic app believes all users are born equal and prefers to see all their post-install actions as organic only.

On the first launch, Dev the developer calls startTracking method with the requestListener. When receiving a successful completion, calls setDeviceTrackingDisabled(true) from the callback function.

Code sample example here.

Retracking

If, for any reason, an opted-out user needs to be tracked going forward, simply call the startTracking method. 

Was this article helpful?
0 out of 0 found this helpful