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.
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 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 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 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.
Use Firebase Authentication to build a sign-in experience.
Or, combine Firebase Authentication with your custom sign-in experience.
In your sign-in interface, get the user's email address.
Follow integration steps for Cocoapods or manual installation.
Optionally, enable debug mode in Xcode.
Call the on-device measurement API with the email you gathered.
Verify API function with debug logs.
If needed, troubleshoot with the help of support resources for Firebase Authentication and Google Analytics.
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