Ometria only processes mobile browsing sessions from identified customers and push notifications need an identified customer as well.
As a part of Creating an event tracking plan for your mobile app, you need to make sure customers are correctly and consistently identified.
This guide can help you with that.
Events for tracking logins and logouts
When your mobile app users log in, you need to send Ometria a
profileIdentified event (see Creating an event tracking plan for your mobile app).
This event makes sure that Ometria can associate the mobile device to a customer profile, allowing us to tie visit sessions to profiles and target devices with push notifications.
profileIdentified event takes either a customer ID or an email, but you can call it in succession with both.
Once you have these identifiers, send them to Ometria as soon as possible.
You can clear the saved customer ID and email from the device by calling the
How to use identifiers
Usually, your contacts will log in to your mobile app via email.
After you send the
profileIdentified event containing the email, Ometria can either create the contact - if seen first on mobile - or match the contact to an existing profile based on their email.
It's good practice to use customer IDs as a primary identifier, rather than emails which can change over a customer's lifetime.
You do need to be more careful when using customer IDs outside the mobile app, e.g. when sending to Ometria's data API or uploading CSV files, as you'll need to make sure the Customer IDs always match.
For example, if a contact is first 'seen' on the mobile app, then the Customer ID you generate should ideally come from your backend systems - or if it's generated in the app itself then it must be synchronised to your backend systems at the earliest opportunity.
If the app generates a customer ID and your backend or your website generates a different one, this can lead to duplicate customer profiles.
If you use both customer ID and email, Ometria will accept both and will give preference to the customer ID when trying to match customer profiles, using email as a fallback.
If we have seen the contact on mobile first, the profile will be created with the first identifier you sent to Ometria via the profileIdentified event.
Further identifiers can be attached to it by sending a customer record to the Ometria data API.
Enriching profile information
When a customer is first seen on mobile, Ometria creates a profile for them based on the identifier you have sent via the profileIdentified event.
This profile will be empty, with no personal information and no marketing preferences. You need to send a customer record to the Ometria data API to supply any further profile data, so you can personalise the messages you will send to the customer.
Multiple customers using the app on the same device
It is possible to associate the app running on one device to multiple customer profiles.
Any contact who once logged into a device can enter push notification campaigns, and the device will show all notifications for all profiles.
One customer using your app on multiple devices
One customer can install, use and log into the app on multiple devices, and all of these devices will be associated to their profile.
If you send a push notification to a contact with more than one device then all opted-in devices will be targeted.
See also: Opting-in to push notifications.
Debugging identification events
When your app development team is integrating with the Ometria SDK, you may want to confirm if login events happen correctly, and which IDs you are sending to Ometria.
The first step is to look at the development environment’s logging console on the platform of your choice (XCode, Android Studio, etc).
You might need to enable more granular logging in the Ometria SDK to see all logs, not just the errors, see the SDK docs for how to do this:
Whenever you call one of the event tracking functions, filter on 'Ometria' to see the contents of the event. You can also see if the Ometria mobile events API has accepted or rejected the event based on the http response.
Once events are accepted by the API, you can also use the Mobile event log to see the events in the Ometria platform.
You can also cross-reference the IDs that you see here with the ones you can see in the contact record to see if there are any mismatches.