TapCub is live — analytics, insights and live chat, free on one platform
Analytics

App GDPR Compliance: Gate SDKs and Device IDs on Consent

Mobile apps differ from websites: SDKs start at launch and device identifiers are personal data, so consent has to gate SDK initialisation. An app-specific checklist with an identifier table, a consent-gate pattern and a worked SDK inventory.

Su He Published Nov 28, 2026 15 min read Analytics
Sample data: three consent-based SDKs (analytics, advertising, attribution) on 10,000 first launches with 58% acceptance. Gating removes all 30,000 starts before a choice and keeps the same 17,400 consented starts.Sample data

App GDPR compliance means no SDK reads the device or sends personal data before it has a lawful basis, which for analytics, advertising and attribution usually means consent. Apps differ from websites: SDKs start at launch and device identifiers are personal data, so consent has to gate SDK initialisation, not just data use. Below: an identifier table, two tests per SDK, a consent-gate pattern and a worked inventory.

What you will learn

  • Device identifiers such as IDFA, IDFV, Android ad ID and install IDs are personal data; narrower IDs lower risk but still need a basis
  • ePrivacy Art. 5(3) applies when an SDK reads the device, so start non-essential SDKs from the consent callback, not at launch
  • In the sample, gating removed 12,600 SDK starts for people who declined and kept all 17,400 consented starts

Why is GDPR compliance different for a mobile app?

A website's analytics tag can wait for a cookie banner because nothing has to load before the page shows it. An app is different in three ways that change how GDPR applies:

  1. SDKs start at launch. Analytics, attribution, advertising and crash SDKs are usually initialised in the first lines of app start-up code, before any screen is drawn. If the consent screen comes after that, the SDKs have already read the device and sent data.
  2. Device identifiers are personal data. GDPR's definition of personal data includes "an online identifier" (Art. 4(1)), and Recital 30 names identifiers provided by devices, applications and tools. An advertising ID, a vendor ID or an install ID ties events to one device, and usually one person.
  3. Reading the device is regulated before GDPR even applies. Article 5(3) of the ePrivacy Directive requires consent for "the storing of information, or the gaining of access to information already stored, in the terminal equipment" of a user, unless it is strictly necessary for a service the user asked for (Directive 2002/58/EC). The EDPB's Guidelines 2/2023 (final version adopted 16 October 2024) read that rule broadly, covering SDKs and identifiers, not only cookies.

The core of this guide follows from those three points: in an app, consent has to gate SDK initialisation, not just data use. Collecting first and filtering later does not work, because the access to the device has already happened. The website version of these rules is covered in GDPR-compliant analytics; this page is the app and SDK version.

Which device identifiers count as personal data?

All of them, once they single out a device. What differs is how far they reach and whether the user can reset them, which changes the risk and what the platforms require.

IdentifierScopeReset by userPlatform rule
iOS advertising ID (IDFA)All apps on the deviceYesApp Tracking Transparency permission required before tracking
iOS identifier for vendor (IDFV)Apps from the same developer on the deviceChanges when all that developer's apps are removedNo permission prompt, still personal data
Android advertising IDAll apps on the deviceYes; returns zeros after the user opts out of ads personalisationFor ads and profiling use only (Play Console Help)
Android ID (SSAID)One app signing key and user on the deviceChanges on factory resetNo prompt, still personal data
App-generated install IDOne app installReinstall or clearing dataAndroid's identifier guidance recommends this kind for non-ads analytics
Push tokenOne app installChanges when the OS rotates itNeeded to deliver notifications the user turned on
IP addressThe networkChanges oftenPersonal data under GDPR when it can be linked to a person

Two rules follow. First, use the narrowest identifier that does the job: product analytics does not need a cross-app advertising ID. Second, a narrower identifier is still personal data, so choosing IDFV over IDFA reduces risk but does not remove the need for a lawful basis.

The App Tracking Transparency prompt is not GDPR consent. Apple's App Store Review Guidelines (5.1.2(i)) require ATT permission before tracking across other companies' apps and sites; GDPR and ePrivacy consent is a separate legal requirement for EU users, with its own wording, purposes and withdrawal. An iOS app serving EU users that uses the IDFA needs both.

Which SDKs need consent before they start?

Sort every SDK by purpose, then apply two tests in order:

  1. ePrivacy Art. 5(3): does the SDK store or read information on the device? If yes, it needs consent unless it is strictly necessary for something the user explicitly asked for (logging in, paying, receiving a notification they turned on).
  2. GDPR Art. 6: what is the lawful basis for processing the data afterwards? Consent for analytics, advertising and attribution in most cases; contract for features the user is using; legal obligation for records you must keep.

Typical results:

  • Advertising and attribution SDKs: consent (and ATT on iOS when they use the IDFA). No regulator treats ad measurement as strictly necessary.
  • Product analytics SDKs: consent in most member states. Some authorities accept narrowly scoped, first-party audience measurement without consent under strict conditions; check your lead authority's guidance before relying on that.
  • Crash reporting: debated. It is first-party and protects the service, but it still reads device data. Many teams gate it too, or limit it to stack traces without persistent identifiers.
  • Payment, login, push delivery: strictly necessary for what the user requested, so no ePrivacy consent, with contract or the user's request as the GDPR basis.

Health data, location history and anything about children raise the bar further: GDPR Article 9 requires explicit consent for special-category data, and the CNIL's recommendation on mobile applications asks publishers to assess each SDK they embed and to document what it collects.

The pattern that works across iOS, Android and cross-platform frameworks:

  1. Split configuration from start. At launch, register the SDK's configuration only: no network calls, no device reads. Most SDKs have a "delayed start" or "manual init" option; if one does not, do not call its start method at launch.
  2. Show the consent screen before any non-essential SDK starts. Offer one toggle per purpose (analytics, advertising, attribution), with "accept all" and "reject all" equally easy to reach.
  3. Start only the SDKs whose purpose was accepted. Call each SDK's start method from the consent callback, not from the app delegate or Application class.
  4. Store the choice and a receipt. Keep the purposes, the time, the consent text version and the app version, so you can show what the user agreed to.
  5. Make withdrawal as easy as giving consent. GDPR Art. 7(3) requires it. Put the same toggles in the app's settings screen, and on withdrawal call the SDK's opt-out or stop method so it sends nothing further.
  6. Ask again when the purposes change. A new SDK or a new purpose needs a new choice; old consent does not stretch to cover it.

Do not show the iOS ATT prompt and treat its answer as GDPR consent, and do not pre-tick toggles. Both are common findings in app reviews.

Worked example: an SDK inventory and what gating changes

Sample data: a shopping app with six SDKs and 10,000 first launches from the EEA in one month. 58% of users accept all purposes on the consent screen; 42% reject or close it.

SDKPurposeData and identifier it sendsBasisWhen it may start
Product analyticsUsage reportsScreens, events, app-scoped device IDConsentAfter "analytics" is accepted
AdvertisingAd delivery and measurementAd requests, advertising IDConsent, plus ATT on iOSAfter "advertising" is accepted
AttributionWhich campaign drove the installInstall referrer, device data, advertising IDConsentAfter "attribution" is accepted
Crash reportingStabilityStack traces, device model, OS versionCheck with your DPO; many gate itGated, or without a persistent ID
Push notificationsMessages the user turned onPush tokenUser's requestAfter the OS notification permission
PaymentsCheckoutCard or wallet detailsContractOnly at checkout

The three consent-based SDKs that commonly start at launch are analytics, advertising and attribution. Counting one "start" as one SDK sending data from one device:

  • Ungated (all three start at launch): 10,000 devices × 3 SDKs = 30,000 starts before the user made a choice. Of those, 4,200 devices × 3 = 12,600 starts belong to people who then said no.
  • Gated (start from the consent callback): 0 starts before a choice. 5,800 devices × 3 = 17,400 starts, all with consent.

The ungated app does not just risk a fine on paper: 12,600 times in one month, a device sent identifiers to a third party for a purpose its owner refused. Gating removes all of them and costs nothing in consented data; the 17,400 consented starts happen either way.

What gating does cost is coverage. Analytics now sees 5,800 of 10,000 new devices, 58%. If you need total counts, the honest options are counting installs from the store consoles (which report aggregates without your SDK) or asking your DPO whether an anonymous, identifier-free measurement mode is acceptable without consent under your authority's reading of Art. 5(3).

app.tapcub.com

SDK starts in one month, ungated vs gated

sample app, 10,000 EEA first launches
Ungated: before a choice30,000
Ungated: for people who declined12,600
Gated: before a choice0
Gated: with consent17,400
Sample data
Sample data: three consent-based SDKs (analytics, advertising, attribution) on 10,000 first launches with 58% acceptance. Gating removes all 30,000 starts before a choice and keeps the same 17,400 consented starts.

How do you handle data subject requests in an app?

Users can ask for access to their data (Art. 15), erasure (Art. 17) and a portable copy (Art. 20), and you have one month to answer in most cases (Art. 12(3)). Apps add two complications:

  • Requests must reach every SDK vendor. Each vendor holding data under your instructions is a processor (Art. 28), so your deletion workflow needs a step per vendor: which identifier it is keyed on, which API or console deletes it, and how long it takes.
  • The identifier may be a device, not an account. A user who never logged in can only be found by device ID. Show the app's analytics device ID in a settings or support screen, or delete by it automatically when the user taps "delete my data".

Apple also requires in-app account deletion for any app that supports account creation (App Store Review Guideline 5.1.1(v)), so the deletion path has to exist inside the app anyway; connect it to the SDK deletion steps.

Are App Store privacy labels and Google Play data safety enough?

No. Apple's privacy details, the iOS privacy manifest and Google Play's data safety form are platform disclosures. They are useful as a cross-check, because they list data types collected by each SDK, but they do not establish a lawful basis, collect consent or answer a deletion request. Use them this way:

  • Build the labels from your SDK inventory, not the other way round. Every row of the inventory should appear in the labels.
  • Diff the labels against each SDK's own documentation on every SDK upgrade. A new version can start collecting a new data type.
  • Keep the privacy policy consistent with both. Apple's guideline 5.1.1(i) requires that third parties such as analytics tools and SDKs protect user data as the app's privacy policy says.

Mobile app GDPR checklist

Use the table below as the working checklist. The website-wide items (records of processing, privacy notice, DPIA, breach procedure) are covered in the GDPR compliance checklist; how to decide what customer data to collect at all is covered in customer data collection. If you use a consent management platform, make sure its mobile SDK can delay other SDKs' start, not just record the choice.

Checklist itemWhat to record or doRule it comes from
SDK inventoryEvery SDK, its vendor, purpose, data types and identifierGDPR Art. 30 records; CNIL app recommendation
Data each SDK sendsEvents, device data, identifiers, IP; check on every SDK upgradeGDPR Art. 5(1)(c) data minimisation
Lawful basis per SDKConsent, contract or legal obligation, written per purposeGDPR Art. 6
Consent gate before initNon-essential SDKs start only from the consent callbackePrivacy Art. 5(3)
Withdrawal in settingsSame toggles as the consent screen; call each SDK's opt-outGDPR Art. 7(3)
RetentionDays kept per data type and per vendorGDPR Art. 5(1)(e)
Deletion request flowOne step per vendor, by account and by device ID; answer within one monthGDPR Art. 12, 17, 28
Store labels and privacy policyBuilt from the inventory and kept consistent with itApp Store guideline 5.1.1; Play data safety

Re-run the whole list when you add an SDK, add a purpose or upgrade an SDK major version.

How to set this up in TapCub

The six-SDK shopping app above uses TapCub as its product analytics SDK. Here is how the analytics row of the inventory is handled.

  1. Initialise in two steps. Every TapCub client SDK (iOS, Android, Flutter, React Native, HarmonyOS) has preInit, which only stores configuration and binds the app lifecycle: no network calls and no device reads. Call it at launch (on Android, in Application.onCreate). Call init from your consent callback once analytics is accepted; that is when the SDK fetches its configuration, creates a device ID and starts sending. If your project does not require consent, call both at start-up. Setup per platform: iOS SDK.
  2. Know which identifier it uses. The iOS SDK uses the IDFV as its device ID and does not read the IDFA, so it shows no ATT prompt; the Android SDK uses ANDROID_ID and does not read IMEI, MAC, OAID or the advertising ID. The iOS package ships a privacy manifest that declares device ID, product interaction, crash and performance data, with tracking set to false. A persistent device ID and login take effect only when the project is in identified mode (collection tier 3); in anonymous mode the SDK sends events without writing a device ID.
  3. Wire withdrawal to opt-out. When the user turns analytics off in your settings screen, call optOut; optIn resumes. TapCub does not draw the consent screen itself; your app or consent platform does, then calls these methods.
  4. Handle deletion in Configuration › Privacy center. Data subject requests cover access, erasure, restriction and portability, and the subject can be a device, a login, an email or a person, so a user who never logged in can still be found by device ID. Erasure runs after a cooling-off period and can be cancelled before it runs. See handle data subject requests. Expired rows are deleted on a schedule, and retention cannot exceed your plan's cap.
  5. Check before release. Open App analytics › Realtime with a test device: nothing should arrive while the consent screen is open or after you reject analytics; after you accept, an $app_start event confirms the SDK started.

TapCub covers the analytics row only. The advertising, attribution and crash SDKs of other vendors need their own gates and deletion steps.

FAQ

Does GDPR apply to my mobile app if my company is outside the EU?

Yes, if the app offers goods or services to people in the EU or monitors their behaviour there (GDPR Art. 3(2)). Analytics that profiles how EU users use the app counts as monitoring. You may also need an EU representative under Art. 27.

Is a device ID personal data under GDPR?

Yes. GDPR counts online identifiers as personal data when they can single out a person, and device identifiers such as the IDFA, IDFV, Android advertising ID and app install IDs do that. A resettable or app-scoped ID lowers the risk but still needs a lawful basis.

In most EU countries, yes, because the SDK reads or stores information on the device (ePrivacy Art. 5(3)) for a purpose that is not strictly necessary for what the user asked. Some regulators allow narrowly scoped first-party measurement without consent; check your lead authority before relying on it.

Is the iOS App Tracking Transparency prompt enough for GDPR consent?

No. ATT is Apple's permission for tracking across other companies' apps and sites. GDPR and ePrivacy consent is a separate legal requirement with its own purposes, wording and withdrawal. EU users of an app that uses the IDFA need both, and an app that never tracks still needs GDPR consent for non-essential SDKs.

What does a GDPR-compliant mobile app need before launch?

An SDK inventory, a lawful basis for each SDK, a consent screen that starts SDKs only after the matching purpose is accepted, a withdrawal toggle in settings, a deletion flow that reaches every vendor, store privacy labels built from the inventory and a privacy policy that matches all of it.

Sources

Filed underAnalytics

Was this article helpful?

We use your answers to fix and expand this page.

Su He

Data Analyst

Explores traffic sources, conversion funnels, and retention, using clear metric definitions and concrete examples to explain what the numbers mean.

App analytics that waits for consent

Two-step SDK init, app-scoped device IDs with no advertising ID, opt-out and data subject requests by device or login.

See your data clearly. Find your growth.

Every click, backed by data. Install one line of code and see your first numbers in a minute.

No credit card · Free plans for analytics and chat · Cookieless analytics