User Settings
You can ask your users about their privacy preferences. Once the user has signed up, you will have the user id.
To track Sign-up:
- Call the below method to track a user when they first sign-up for your app.
Copied
To track Sign-in:
- Call the below method to track a user when they login to your app.
Copied
For existing users:
- Call the below method to track any existing users of your app.
Copied
On Sign-out:
- Call the below method during user sign-out to let the framework know.
Copied
To Show Privacy Consent
Support AppTracking Permission on iOS 14
With iOS 14.5, iPadOS 14.5, tvOS 14.5 and later, you need to ask the user’s permission (explicitly) via the AppTrackingTransparency framework to track that user.
Most applications choose to present a gentle explainer screen before asking for permission to track users. The explainer screen give the users more context on the usage tracking and how the user id is associated with the usage data.
When the user continues to the explainer screen, you should call the ATTrackingManager.requestTrackingAuthorization to show the alert.
Important:
- Add "Privacy - Tracking Usage Description" key in the Info.plist file.
- Add "AppTrackingTransparency.framework" into your app's Target.
- Import AppTrackingTransparency.
Implementation:
Show Apptics Privacy Consent on iOS 13 and below
- Call this method if you want to present the user consent.
Copied
In-built Privacy Settings:
- Call the below method to open the Analytics settings view controller. The navigation controller parameter is optional.
Copied
- You can customize the UI by implementing methods of our theme manager class i.e., APTheme, APSettingsTheme, and APUserConsentTheme, and setting it back to Apptics.
- You can provide the user Settings on your own by adding three buttons to your Settings screen. Check for APPrivacyStatus by calling getPrivacyStatus if it is equal to APPrivacyStatusUnKnown then ask/show user consent and set back the status to Apptics using setTrackingStatus:, setCrashReportStatus:, and setPersonalInfoTrackingStatus:.
GET and SET methods are available in Apptics class.
- If the user turns ON/OFF "Send diagnostics and usage statistics", set YES/NO in setTrackingStatus method.
- If the user turns ON/OFF "Crash reports", set YES/NO in setCrashReportStatus method.
- If the user turns ON/OFF "Include userID", set "YES/NO" in setPersonalInfoTrackingStatus method.
When the crash report is turned OFF in the Settings and if the app crashes, the user is shown an alert.