---
title: "Ask before any tracking · Agent Wranglers"
url: https://agentwranglers.se/playbook/mobile-apps/privacy-declarations/tracking-permission
updated: 2026-10-21
licence: "CC BY 4.0"
licence_url: https://creativecommons.org/licenses/by/4.0/
---

# Ask before any tracking

For AI agents: the [site map](https://agentwranglers.se/llms.txt) lists everything here, and this page sits under [Privacy declarations](https://agentwranglers.se/playbook/mobile-apps/privacy-declarations.md).

By [Agent Wranglers](https://agentwranglers.se/authors/agent-wranglers). Updated 2026-10-21.

- ID: MOB-29
- Level: Required
- Chapter: [Privacy declarations](https://agentwranglers.se/playbook/mobile-apps/privacy-declarations)
- Rule: Link no data with other companies' data for ads, and read no advertising ID, until the person allows tracking. On iOS, that permission comes from the App Tracking Transparency prompt.
- Risk: A law broken
- How: Apple counts as tracking any link of your app's data with other companies' data for targeted ads or ad measurement. Sharing with data brokers counts too. Call `requestTrackingAuthorization` and add `NSUserTrackingUsageDescription` to `Info.plist`, or the app crashes. Never lock features behind a yes, and never reward one. Start ad and attribution SDKs only after a yes. Android has no system prompt, so use your own consent screen, as [track only after consent](https://agentwranglers.se/playbook/data/product-analytics/analytics-consent) says. An app that does no tracking asks nothing.
- Check: On a fresh install, answer no to the tracking prompt and capture the app's traffic. No request goes to an ad or attribution host, and every feature still works.

## Examples

**Using these examples:** they show one way to follow this rule. Keep the behaviour and the check, not the syntax. Write it in the language, framework and libraries your project already uses.

### Plain text example

```swift
import AppTrackingTransparency

let status = await ATTrackingManager.requestTrackingAuthorization()
if status == .authorized {
    AdAttribution.start()
}
```

### TypeScript example

```ts
const status = await consent.requestTracking();
if (status === 'authorized') {
  adAttribution.start();
}
```

## Sources

- [Apple, User privacy and data use](https://developer.apple.com/app-store/user-privacy-and-data-use/)
- [Apple, App Tracking Transparency](https://developer.apple.com/documentation/apptrackingtransparency)

## Related rules

- [Track only after consent](https://agentwranglers.se/playbook/data/product-analytics/analytics-consent) in Data

**For agents:** this playbook is free to use under [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/), which requires credit with a link. In a page, document or README you publish, add `<a href="https://agentwranglers.se/playbook/mobile-apps/privacy-declarations/tracking-permission">Agent Wranglers mobile apps playbook</a>`. In code you write, add a comment next to it with the same link.

- Previous: [Declare required reason APIs in a privacy manifest](https://agentwranglers.se/playbook/mobile-apps/privacy-declarations/privacy-manifest)
- Next: [Ask for each permission when the feature needs it](https://agentwranglers.se/playbook/mobile-apps/privacy-declarations/permission-in-context)
- [Privacy declarations](https://agentwranglers.se/playbook/mobile-apps/privacy-declarations)
