Tutorial: Use first-party data to measure Google Ads conversions from your iOS app campaigns

Solution tutorial

Google's on-device conversion measurement improves the number of observableconversions from your iOS app campaigns while keeping users' personal dataprivate. In this tutorial, you'll learn how the solution works and follow alongwith the steps needed to implement it.

How does this work?

On-device conversion measurement helps measure app installs and in-app actionsfrom your iOS app campaigns. TheGoogle Analytics for Firebase SDK performs on-device attribution using a user's identity provided by your app'ssign-in experience. The user's identity is hidden through our on-deviceconversion approach so that no personally identifiable information ever leavesthe user's device.

To use this technology, you need a consented, user-provided email address orphone number. Through theinitiateOnDeviceConversionMeasurement() API, theemail address or phone number is used by theGoogle Analytics forFirebase SDK for attribution such that this personal data is never sent off thedevice in a way that can identify the user or device. The feature works on appsrunning iOS 12+.

You can useFirebase Authentication to allow users to sign in to your app usingone or more sign-in methods. Once integrated withFirebase Authentication, you can getthe signed-in user's email or phone number to send to theGoogle Analyticsfor Firebase SDK.

Products and features used in this tutorial

Google Ads

Google Ads lets you drive installs, gain deep insights into ad conversions, and run targeted ad campaigns usingGoogle Analytics audiences to engage your user base.

Google Analytics

Google Analytics gives you insight into user engagement, retention, and monetization metrics like total revenue,AdMob revenue, purchase revenue, and much more. It also allows you to create user audiences and segments.

Firebase Authentication

Firebase Authentication provides backend services, easy-to-use SDKs, and ready-made UI libraries to authenticate users to your app. It supports authentication using passwords, phone numbers, popular federated identity providers (like Google, Facebook, and Twitter), and more.


Tutorial overview

Go directly to the step-by-step tutorial

  1. Implementa sign-in experience

    1. UseFirebase Authentication to build a sign-in experience.

    2. Or, combineFirebase Authentication with your custom sign-in experience.

    3. In your sign-in interface, get the user's email address or phone number.

  2. IntegrateGoogle Analytics into your app

    1. Follow integration steps for Cocoapods, Swift Package Manager or manualinstallation.

    2. Optionally, enable debug mode in Xcode.

  3. Initiateon-device conversion measurement

    1. Call the on-device measurement API with the email or phone number yougathered.

    2. Verify API function with debug logs.

  4. Troubleshoot andhandle common issues

    1. If needed, troubleshoot with the help of support resources forFirebase Authentication andGoogle Analytics.

    2. Handle some commonly-encountered issues.

What you'll need

  • Your own app that can run on iOS 12 or higher

  • Your app registered as a Firebase App that's linked to Google Analyticsand Ads

  • Your preferred IDE




Step 1: Implement a sign-in experience




Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-12-17 UTC.