Which Device IDs You Need to Pass to RevenueCat for Accurate Ad Attribution
Learn which device IDs ($airbridgeDeviceId, IDFA, IDFV, GAID, IP) to pass to RevenueCat, how Airbridge resolves iOS and Android IDs, and ATT timing rules.

Key Takeaways
- Five identifiers power RevenueCat-to-Airbridge matching: Pass
$airbridgeDeviceId(viasetAirbridgeDeviceID()), plus$idfa,$idfv,$gpsAdId, and$ip(viacollectDeviceIdentifiers()), right after configuring Purchases SDK and before the first purchase. - Why
$airbridgeDeviceIdis essential: On ATT-declined iOS devices (where IDFA is zeroed out) and GAID-limited Android devices (where Airbridge falls back to App Set ID), Airbridge's Device UUID is the reliable bridge connecting server-side renewals back to the install cohort. - Re-call after ATT opt-in on iOS: Import the
AdSupportframework on iOS, and callcollectDeviceIdentifiers()again if a user accepts the App Tracking Transparency prompt so$idfaupdates in RevenueCat. - Match User IDs to avoid inflated counts: Pass RevenueCat's App User ID to Airbridge during early events like sign-up or sign-in; if Airbridge cannot match a User ID, it generates a random ID and overcounts subscribers.
- Never set placeholder campaign values: RevenueCat stores optional attribution attributes (
$mediaSource,$campaign,$adGroup) as write-once fields—settingOrganicorUnknownpermanently blocks final attribution values.
For RevenueCat to attribute server-side free trials, initial purchases, and renewals back to the right ad campaigns in Airbridge, pass five recommended device identifiers before the first purchase occurs: Airbridge Device ID ($airbridgeDeviceId via setAirbridgeDeviceID()), IDFA ($idfa), IDFV ($idfv), GAID ($gpsAdId), and IP address ($ip)—alongside a matching User ID logged in both SDKs. Calling collectDeviceIdentifiers() handles $idfa, $idfv, $gpsAdId, and $ip automatically, while setAirbridgeDeviceID() links RevenueCat's server-to-server events directly to the UUID Airbridge uses to track that device.
Subscription apps lose attribution accuracy the moment a renewal happens in the background. When a user installs from a Meta Ads or TikTok campaign on Day 0, starts a 7-day trial, and gets billed on Day 7 while the app is closed, Apple or Google notifies RevenueCat's servers—not your app's client SDK. RevenueCat then forwards that Subscribe event server-to-server to Airbridge. If RevenueCat does not have the exact device and user identifiers Airbridge recorded at install, that renewal cannot join back to the campaign that paid for the user.
The Five Device Identifiers RevenueCat Uses for Airbridge Attribution
RevenueCat is not an attribution network—it does not decide which ad caused an install. Instead, RevenueCat's Airbridge integration forwards subscription lifecycle and revenue events from RevenueCat's servers to Airbridge so Airbridge can match them to the winning touchpoint and campaign cohort.
While RevenueCat will still attempt to dispatch events even if subscriber attributes are missing, collecting all five reserved Customer Attributes below is strongly recommended for accurate attribution:
| RevenueCat Attribute Key | Identifier | Platform | How to Populate It | Why Airbridge Needs It |
|---|---|---|---|---|
$airbridgeDeviceId | Airbridge DeviceUUID | iOS & Android | Fetch from Airbridge SDK (fetchDeviceUUID), then call setAirbridgeDeviceID() | Direct deterministic link to Airbridge's device record, especially when IDFA or GAID is unavailable |
$idfa | Identifier for Advertisers | iOS | collectDeviceIdentifiers() (requires AdSupport framework + ATT opt-in) | Primary iOS advertising match key when the user grants ATT consent |
$idfv | Identifier for Vendors | iOS | collectDeviceIdentifiers() | Core iOS fallback identifier when ATT is declined or unprompted |
$gpsAdId | Google Advertising Identifier (GAID) | Android | collectDeviceIdentifiers() | Primary Android advertising match key when ad tracking is permitted |
$ip | Device IP Address | iOS & Android | collectDeviceIdentifiers() | Supports matching and is required for iOS Meta AEM eligibility on S2S events |
How Airbridge Determines the Device ID on iOS and Android
Understanding what Airbridge actually stores inside its Device UUID—documented in Airbridge's Identifiers guide—explains why passing $airbridgeDeviceId alongside platform IDs closes attribution gaps on both operating systems.
iOS Device ID Resolution Order
Airbridge resolves an iOS device identifier in strict fallback order:
- IDFA (Default): Issued by Apple per device and persists even if the user reinstalls the app. However, IDFA is collected as all zeros (
00000000-0000-0000-0000-000000000000) on iOS simulators and in every opt-out scenario: when the user has not responded or was not prompted for ATT, declined the ATT prompt, is under age restrictions blocking ad tracking, disabled app tracking requests in iOS settings, or initially allowed tracking and later opted out in device settings. (Apple deprecated Limit Ad Tracking starting in iOS 14.0, and ad tracking is always restricted without ATT consent on iOS 14.5 and later.) - IDFV (First Fallback): When IDFA is unavailable (ATT declined or iOS simulator), Airbridge uses the IDFV (Identifier for Vendors). All apps from the same vendor on a device share the same IDFV; it resets only if the user deletes every app from that vendor and reinstalls.
- Randomly Generated ID (Final Fallback): If neither IDFA nor IDFV is available, Airbridge generates a random UUID.
Android Device ID Resolution Order
Airbridge resolves an Android device identifier using a parallel three-step chain:
- GAID (Default): Issued by Google Play per device; persists across app reinstalls and resets only if the user manually resets it in device settings. GAID is collected as
00000000-0000-0000-0000-000000000000if the user limits ad tracking, and is unavailable on non-Google Play devices such as Amazon FireStick. - App Set ID (
AppSetId, First Fallback): When GAID is unavailable, Airbridge falls back to Google Play's App Set ID. A developer-scopedAppSetIdis shared across apps from the same developer on a device (resetting only when all of that developer's apps are uninstalled), whereas an app-scopedAppSetIdresets on every reinstall. - Randomly Generated ID (Final Fallback): If neither GAID nor
AppSetIdis available, Airbridge generates a random UUID.
| Platform | Primary ID | First Fallback | Final Fallback | Persists Across Single-App Reinstall? |
|---|---|---|---|---|
| iOS | IDFA (ATT opt-in required) | IDFV | Random UUID | IDFA: Yes; IDFV: Yes if another vendor app stays installed (resets if all vendor apps deleted) |
| Android | GAID | App Set ID (AppSetId) | Random UUID | GAID: Yes (unless manually reset); Developer-scoped AppSetId: Yes while another developer app remains |
Because RevenueCat's collectDeviceIdentifiers() collects $idfa, $idfv, $gpsAdId, and $ip—and does not collect Android AppSetId or Airbridge's internal random fallback—explicitly passing $airbridgeDeviceId via setAirbridgeDeviceID() gives Airbridge a direct deterministic link to match the RevenueCat subscriber back to the device record.
Code Setup, Initialization Timing, and iOS ATT Consent Rules
Set up the latest Airbridge SDK and RevenueCat Purchases SDK on every platform where you collect subscriptions, then wire device identifier collection right after initializing RevenueCat.
Swift (iOS) Implementation Pattern
Import AdSupport so RevenueCat can read the IDFA when ATT permission is granted:
import AdSupport
import Purchases
// 1. Configure RevenueCat Purchases SDK
Purchases.configure(withAPIKey: "public_sdk_key")
// 2. Automatically collect $idfa, $idfv, and $ip
Purchases.shared.attribution.collectDeviceIdentifiers()
// 3. Retrieve Airbridge DeviceUUID (via Airbridge SDK fetchDeviceUUID)
// and pass it to RevenueCat
Purchases.shared.attribution.setAirbridgeDeviceID(deviceUUID)
Kotlin (Android) Implementation Pattern
// 1. Configure RevenueCat Purchases SDK
Purchases.configure(this, "public_sdk_key")
// 2. Automatically collect $gpsAdId and $ip
Purchases.sharedInstance.collectDeviceIdentifiers()
// 3. Retrieve Airbridge DeviceUUID from the Airbridge SDK
// and pass it to RevenueCat
Purchases.sharedInstance.setAirbridgeDeviceID(deviceUUID)
Four Timing and Consent Rules You Must Follow
- Call after
Purchases.configure()and before the first purchase: BothcollectDeviceIdentifiers()andsetAirbridgeDeviceID()must execute after the Purchases SDK finishes configuring and before your paywall triggers its first trial or purchase. Otherwise, the firstTRIAL_STARTEDorINITIAL_PURCHASEwebhook can leave RevenueCat without Airbridge device attributes. - Call
collectDeviceIdentifiers()again after ATT opt-in: It is completely safe to callcollectDeviceIdentifiers()multiple times—RevenueCat only transmits new or updated values. If you present the iOS ATT prompt during onboarding or after sign-up and the user taps Allow, callPurchases.shared.attribution.collectDeviceIdentifiers()again immediately so$idfaupdates in RevenueCat. - Never write placeholder values to optional campaign attributes: If you optionally pass reserved attribution attributes (
$mediaSource,$campaign,$adGroup,$ad,$keyword,$creative) into RevenueCat, set final attribution values only. RevenueCat treats those fields as write-once per customer—writing temporary placeholders likeOrganic,Unknown, orNo User Consentpermanently prevents RevenueCat from recording the real campaign later. - Enable server-side SKAN calculation for iOS: If you want RevenueCat server-to-server events (
Start Trial,Subscribe) to update your iOS SKAdNetwork (SKAN) conversion values in Airbridge, make sure your Airbridge iOS SDK is v4.8.0 or higher (v4.8.1+ recommended) and setcalculateSKAdNetworkByServerEnabledtotrue.
Match User IDs, Prevent Double Counting, and Verify End-to-End
Device IDs solve device-level attribution matching, but per Airbridge's RevenueCat integration guide, three companion steps keep your subscriber counts and revenue totals accurate:
- Match User IDs across both SDKs: Send RevenueCat's App User ID to the Airbridge SDK (for example via
setUserID) when logging early events such as sign-up or sign-in before the user subscribes. If Airbridge cannot find a matching User ID for an incoming RevenueCat event, Airbridge generates a random User ID—which inflates your reported subscriber count above reality. - Stop client-side subscription event logging: Once RevenueCat is wired to forward subscription events server-to-server, make sure the Airbridge SDK does not also log those same subscription events from the client, or your revenue and subscriber totals will double count.
- Configure dashboard credentials and Revenue reporting mode: Copy your Airbridge Subdomain and Airbridge Token from Integrations > Third-party Integration > RevenueCat, paste them into RevenueCat's Airbridge integration settings, click Use default event names, and choose Gross (before store commissions and taxes) or Net (after estimated store fees/taxes) based on your finance standard—remembering that Airbridge subscription attribution events should reflect the charged amount, not a verified catalog price.
How to Verify Your Setup Before Releasing
Before shipping to production, run a quick sandbox verification:
- Make a sandbox purchase on a fresh test device after confirming
collectDeviceIdentifiers()andsetAirbridgeDeviceID()ran. - Open the tester's Customer View in RevenueCat and confirm
$airbridgeDeviceIdplus the platform IDs ($idfa/$idfvon iOS or$gpsAdIdon Android) and$ipare listed. - Check Customer History and the Last dispatched events panel in RevenueCat's Airbridge integration settings to confirm delivery succeeded.
- Wait up to 10 minutes and verify the event lands cleanly in Airbridge's App Real-time Log under the matching User ID and device.
Turn RevenueCat Renewals Into Campaign-Level ROAS
Once device IDs and User IDs are wired properly, every trial conversion and renewal in RevenueCat connects straight back to your Google Ads, Meta Ads, Apple Ads, and TikTok for Business campaigns in Airbridge—without needing users to reopen your app. Airbridge is trusted by 1,000+ teams worldwide (4.7/5 G2 rating) on a self-serve Core Plan: 14-day free trial, then $40+/mo (500,000 data points/month included, $0.0001 per extra data point, up to 2 third-party integrations, Predictive LTV for 1–180 days, no annual lock-in, cancel anytime). Compare plans on the Airbridge pricing page.
FAQS
Frequently Asked Questions
Is setAirbridgeDeviceID() required if I already call collectDeviceIdentifiers() in RevenueCat?
Yes, you should call both collectDeviceIdentifiers() and setAirbridgeDeviceID() because collectDeviceIdentifiers() only captures platform IDs ($idfa, $idfv, $gpsAdId, and $ip) and does not pull Airbridge's DeviceUUID. Passing $airbridgeDeviceId gives Airbridge a direct deterministic match even when iOS ATT is declined or Android GAID falls back to App Set ID.
When should I call collectDeviceIdentifiers() if my app asks for iOS ATT permission after launch?
Call collectDeviceIdentifiers() once immediately after Purchases.configure() so $idfv and $ip are stored before any purchase, then call collectDeviceIdentifiers() a second time right after the user accepts the ATT prompt. RevenueCat safely deduplicates repeated calls and updates $idfa as soon as the new value is available.
What happens on Android when a user limits ad tracking and GAID is zeroed out?
When GAID is unavailable or returned as 00000000-0000-0000-0000-000000000000, Airbridge automatically falls back to Google Play's App Set ID (AppSetId), or a random UUID if neither exists. Because Airbridge exposes that resolved identifier as its DeviceUUID, passing $airbridgeDeviceId to RevenueCat keeps server-side renewal attribution working without GAID.
Why are my subscription user counts higher in Airbridge than in RevenueCat?
Inflated subscriber counts happen when RevenueCat and the Airbridge SDK do not log the exact same User ID, causing Airbridge to generate a random User ID for incoming RevenueCat events. Pass RevenueCat's App User ID to Airbridge during early events like sign-up or sign-in, and confirm the Airbridge SDK is not double-logging subscription events.
Can RevenueCat server-side events update iOS SKAN conversion values in Airbridge?
Yes, RevenueCat server-to-server events can update iOS SKAN conversion values when your app runs Airbridge iOS SDK v4.8.0 or higher (v4.8.1+ recommended) with calculateSKAdNetworkByServerEnabled set to true.
Related reading
Connect RevenueCat renewals to ad spend
Pass Airbridge device IDs to RevenueCat and track attributed trials, renewals, and Predictive LTV per campaign.


