Tutorial: Measure iOS Ads conversions

Solution tutorial

Google’s on-device conversion measurement improves the number of observable conversions from your iOS app campaigns while keeping users’ personal data private. In this tutorial, you’ll learn how the solution works and follow along with the steps needed to implement it.

How does this work?

On-device conversion measurement helps measure app installs and in-app actions from your iOS app campaigns. The Google Analytics for Firebase SDK performs on-device attribution using a user’s identity provided by your app’s sign-in experience. The user’s identity is hidden through our on-device conversion approach so that no personally identifiable information ever leaves the user’s device.

To use this technology, you need a consented, user-provided email address. Through the initiateOnDeviceConversionMeasurement() API, the email address is used by the Google Analytics for Firebase SDK for attribution such that the email is never sent off the device in a way that can identify the user or device. The feature works on iOS 11+.

You can use Firebase Authentication to allow users to sign in to your app using one or more sign-in methods. Once integrated with Firebase Authentication, you can get the currently signed-in user’s email to send to the Google Analytics for 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 using Google 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. Implement a sign-in experience

    1. Use Firebase Authentication to build a sign-in experience.

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

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

  2. Integrate Google Analytics into your app

    1. Follow integration steps for Cocoapods or manual installation.

    2. Optionally, enable debug mode in Xcode.

  3. Initiate on-device conversion measurement

    1. Call the on-device measurement API with the email you gathered.

    2. Verify API function with debug logs.

  4. Troubleshoot and handle common issues

    1. If needed, troubleshoot with the help of support resources for Firebase Authentication and Google Analytics.

    2. Handle some commonly-encountered issues.

What you'll need

  • Your own iOS 11+ app

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

  • Your preferred IDE




Step 1: Implement a sign-in experience