A User profile contains information about the user like email, phone number, name, etc. Contlo creates a user profile for each user that launches your application, regardless of the login status.

There are two types of users:

  • Anonymous Users: Unidentified users whose profile does not have an email or a phone number. When a new user launches your application, Contlo creates an anonymous profile for them. The profile includes a Mobile Push Subscription that is in a pending state.
  • Identified users: These are users with known email or phone number information.

Set up profile details

To set up the user profile, use the sendUserDetails() method in the Contlo SDK. You only need to call this method once. Add this method to the file that contains the login flow of the application.

Contlo.sendUserDetails({
          "first_name": firstName,
          "last_name": lastName,
          "email": userEmail,
          "phone_number": phone,
        });

Profile Properties

These are the custom properties of a user that accept key-value pairs. Profile properties contain some extra information about the user. You can define these properties under custom_propeties in the sendUserDetails() method as shown below:

Contlo.sendUserDetails({
          "first_name": firstName,
          "last_name": lastName,
          "email": userEmail,
          "phone_number": phone,
          "custom_properties": {
            extraKey: extraValue
          }
        });

After you define the user details, you can see all the user's information in the Audience section on the Contlo Dashboard.

Track Advertising ID

If you want to track anonymous users across devices, you can enable tracking of Advertising ID. To set the Advertising ID as a profile property in the contact details under the Audience Section in your Contlo dashboard, follow the steps below:

  1. Add the following permission in your AndroidManifest.xml file:
<uses-permission android:name="com.google.android.gms.permission.AD_ID"/>

📘

You need to explicitly ask your user for their consent to track Advertising ID as per GDPR Compliance Rules.

  1. To get user consent, use the sendAdvertisingId() method as shown below:
Contlo.sendAdvertisingId(<consent>) // Here consent is a boolean value

This feature is optional and Contlo will still be able to track the anonymous user in the same device.