The SDK-only trial integration for the onboarding use case depends on calling the
trackSignUp method. Each method call generates a signup event, which is processed and has a risk assessment and supporting evidence attributed to it.
Upon completing this integration, you'll have access to the Onboarding dashboard that shows a detailed analysis of the risk assessments provided by Incognia for each signup.
In order to allow retroactive address verifications, Incognia needs to have an association between a device and a unique account identifier. The Account ID is used for this purpose.
This association must happen in two moments:
This covers the scenario where the application is updated with the Incognia SDK and the user is already logged in. The
Application.onCreate() on Android and the
[AppDelegate application:didFinishLaunchingWithOptions:] on iOS are good places to do this.
If the Account Id is not available in those locations, it is important to forward the value to the Incognia SDK as soon as it is available. The important action here is to call setUserId whenever the application initializes so it is guaranteed that we always know that a specific user is associated with a specific device.
It is necessary to call the setUserId method when the user finishes the login and clearUserId when the user logs out. This is usually done in the callback of these two actions.
To clear the Account ID, call a
Incognia.clearUserId when the user logs out.
trackSignUp method has two parameters:
- Signup ID (Optional): A unique identifier for new account signups, allowing you to identify and analyze Incognia's results. Please observe our Privacy and Hashing tips on how to securely generate these IDs.
- Address (Optional): The address declared by the user creating the account. The provided address is compared to the device's location behavior to assess whether the new user actually lives at that address.
An example of how to create the
address object can be found below.
val address = Address(LOCALE) //E.g: Locale('en-us') address.countryName = COUNTRY_NAME //E.g: United Statesaddress.countryCode = COUNTRY_CODE //E.g: USaddress.adminArea = ADMIN_AREA //E.g: New York (REQUIRED)address.subAdminArea = SUB_ADMIN_AREA //E.g: New Yorkaddress.locality = LOCALITY //E.g: New York City (REQUIRED)address.subLocality = SUB_LOCALITY // E.g: Manhattanaddress.thoroughfare = THOROUGHFARE //E.g: Fifth Avenue (REQUIRED)address.subThoroughfare = SUB_THOROUGHFARE //E.g: 350 (REQUIRED)'address.postalCode = POSTAL_CODE //E.g: 10118 (REQUIRED)
Address address = new Address(LOCALE); //E.g: new Locale('pt-br') address.setCountryName(COUNTRY_NAME); //E.g: United Statesaddress.setCountryCode(COUNTRY_CODE); //E.g: USaddress.setAdminArea(ADMIN_AREA); //E.g: New York (REQUIRED)address.setSubAdminArea(SUB_ADMIN_AREA); //E.g: New Yorkaddress.setLocality(LOCALITY); //E.g: New York City (REQUIRED)address.setSubLocality(SUB_LOCALITY); // E.g: Manhattanaddress.setThoroughfare(THOROUGHFARE); //E.g: Fifth Avenue (REQUIRED)address.setSubThoroughfare(SUB_THOROUGHFARE);//E.g: 350 (REQUIRED)address.setPostalCode(POSTAL_CODE); //E.g: 10118 (REQUIRED)
The address can also be set using an address line.
val address = Address(LOCALE) //E.g: Locale('en-us')address.setAddressLine(0, address)
Address address = new Address(LOCALE); //E.g: new Locale('pt-br')address.setAddressLine(0, ADDRESS);
trackSignUp method must be called after a new account signup happens in your application.
// Records a signup event. The signUpId and address are optional.InLocoDemo.trackSignUp(context, signUpId, address)
// Records a signup event. The signUpId and address are optional.InLocoDemo.trackSignUp(context, signUpId, address);
If the method is correctly called, signup events will start being generated and sent to Incognia. The following line should also be printed on the Logcat console.
Event sent: pov_sign_up_event
After your application is released, and enough events are generated, the processed events will be available on the Onboarding dashboard.