User Demographic Collection

Starting with version Android SDK 5.0.0, iOS SDK 4.0.0, RN SDK 4.0.0 the Lucra SDK includes a Headless Demographic Collection feature that allows integrators to collect demographic information.

Headless Demographic Collection

Overview

The Lucra SDK now includes a Headless Demographic Collection feature that allows integrators to collect demographic information (date of birth, email, and zip code) from users before they can participate in free tournaments. This feature is designed to work seamlessly with the existing tournament joining flow while providing a standalone demographic collection form for independent use.

Key Features

  • Automatically detects when demographic information is missing for free tournaments

  • Can be launched as a standalone demographic collection form

  • Works with existing tournament joining logic

Tournament Joining Logic

The SDK implements different validation logic based on tournament type:

When the tournament buy-in is required, full KYC verification is required (same as before).

  • Error: Returns UserStateError.Unverified error if user is not verified

Free Tournaments (Free to Play)

When the tournament buy-in is free ($0), only email, zip code, and date of birth is required.

  • Error: Returns UserStateError.DemographicInformationMissing if email or zip code is missing

API Changes

New LucraFlow

Launch the demographic form to collect user demographic information. This flow:

  • Requires authentication

  • Auto-fills previously provided information

  • Allows users to submit their email and zip code

  • Exits automatically upon successful submission

  • Allows resubmission if errors occur

New Tournament Error Type

This error is returned when:

  • User attempts to join a free tournament (buyInAmount = 0.0)

  • User's email or zip code is missing or empty

Implementation Details

Demographic Data Validation Logic

The SDK determines missing demographic data using this logic:

  • Email: Must not be null or empty string

  • Zip Code: Must not be null or empty string

  • Both fields are required for free tournament participation

Flow Behavior

DemographicForm Flow:

  • Entry Point: Requires user authentication

  • Auto-fill: Pre-populates fields with previously saved data

  • Validation: SDK-side validation of email and zip code format

  • Submission: SDK submits data to Lucra's servers

  • Exit Behavior: Automatically dismisses on successful submission

  • Error Handling: Shows validation errors and allows resubmission

Error Handling:

  • Form validates input before submission

  • Network errors allow retry

  • Invalid data shows specific field errors

  • Server errors are handled gracefully

Last updated