Apple Ads Attribution Without an MMP
Apple tells you which campaign and keyword brought an install. One token from the app, one call from your server, no IDFA and no tracking prompt.
Apple Ads is the one ad network that answers you directly. Since iOS 14.3 the AdServices framework gives your app a token, and Apple’s attribution API turns it into the campaign behind the install. No contract, no partner program, and it works for users who declined tracking.
- token lifetime
- 24 h
- tap-through window
- 30 days
- view-through window
- 24 h
- retries after a 404
- 3 × 5 s
token lifetime
tap-through window
view-through window
retries after a 404
How it works
The app reads the token on first launch and hands it to your server. Your server asks Apple.
Your server
api-adservices.apple.com
- 01Seconds after first launch
POST /api/v1/ Content-Type: text/plain G9i5hC8lQJeGOfmS+MFycll…One token per request, as plain text.
- 02Too early
404 Not FoundThe record isn’t ready yet. Retry every 5 seconds, up to three times.
- 03The attribution record
200 OK { "attribution": true, "campaignId": 542370539, "keywordId": 87675432, "claimType": "Click" }Ids only. Names come from your Apple Ads reports.
The code
Swift, iOS 14.3+
import AdServices
let token = try? AAAttribution.attributionToken()Your server
curl -X POST https://api-adservices.apple.com/api/v1/ \
-H "Content-Type: text/plain" \
--data-raw "$ATTRIBUTION_TOKEN"Reading the record
When you get nothing back
With Appy, it’s built in
On the Enterprise plan the Appy SDK does all of this for you, and puts Apple Ads in the same report as your links.
First launch
iOS, Appy SDK
- Tapped your Appy linkCredited to the link
- Apple Ads tap or viewCampaign, ad group, keyword
- Developer modeTest record ignored
- NeitherOrganic
Read next
Questions
Do I need the ATT prompt?
No. The token isn’t an advertising identifier.
Why does Apple answer 404?
The record isn’t ready yet, or the token is older than 24 hours. Retry every 5 seconds, three times.
Why is my campaign id 1234567890?
That is Apple’s test record from developer mode. Ignore it.
Do I need an MMP?
No. Any app can call Apple’s API from its own server.
Continue exploring
Know Which Link Brought Every Install: Appy’s iOS and Android SDK
Appy now follows your links past the app store: installs, in-app events and revenue for every link, QR code and campaign, and new users who open on the right screen.
Deferred Deep Linking Without an SDK: How It Actually Works Under the Hood
You can carry link intent across an app install without embedding an attribution SDK. What actually survives the store boundary on Android and iOS, what breaks, and what each workaround costs in privacy.
How to Decrypt the Meta Install Referrer on Android
Facebook and Instagram can tell your app which campaign, ad set and ad brought an install, views included. How to read it and decrypt it.
Looking for something else? Browse all topics on the blog.
See Apple Ads next to every other channel
The Appy SDK on the Enterprise plan reads the token, asks Apple and reports Apple Ads with your links and QR codes.