Overview
When integrating the Keewano SDK into a game that already has an established player base, you need to tell Keewano about your existing users so they are correctly identified by their actual tenure in your game.
Simple Integration
Keewano makes integration into existing games simple. You don't need to export databases, migrate historical logs, or set up complex data pipelines. Just provide one piece of information for your existing players: when they originally registered.
With this single data point, Keewano can:
- Place players in the correct day-in-game cohort (Day 1, Day 30, Day 365, etc.)
- Accurately calculate retention metrics
- Compare behavior patterns between new and veteran players
- Generate meaningful insights about player lifecycle stages
Everything else - player behavior, progression patterns, monetization habits - is captured automatically by the SDK from integration day forward.
The Method
Use KeewanoSDK.ReportUserRegisteredBeforeSDKIntegration() to report the original registration date for users who existed before the SDK was integrated.
static public void ReportUserRegisteredBeforeSDKIntegration(DateTime originalRegistrationTime)
When to Use This Method
Call this method only for users who:
- Already had an account in your game before the Keewano SDK was integrated
- Have a known registration date in your existing player database
Do NOT call this method for:
- New users who register after SDK integration (they are tracked automatically)
- Users whose original registration date is unknown
Usage
Recommended Integration Flow
public static readonly DateTime SDKIntegrationDate = new DateTime(2025, 2, 1);
void OnUserAuthenticated(UserData user)
{
if (user.RegistrationDate < SDKIntegrationDate)
{
}
}
Definition KeewanoSDK.cs:18
static void ReportUserRegisteredBeforeSDKIntegration(DateTime originalRegistrationTime)
Reports the original registration date for users who existed before SDK integration.
Definition KeewanoSDK.cs:234
Simple Example
DateTime originalRegistration = new DateTime(2022, 3, 15);
Method Behavior
Once Per Installation
This method can only be called once per installation. Subsequent calls are silently ignored.
Date Validation
The method validates that the provided date is in the past. Future dates are rejected:
In the Unity Editor, a warning is logged when invalid dates are provided.
Best Practices
Call Early
Call this method as early as possible after user authentication:
void Start()
{
AuthenticateUser();
}
void OnAuthenticationComplete(UserData user)
{
if (user.RegistrationDate < SDKIntegrationDate)
{
}
LoadMainMenu();
}
Use Server-Side Data
Always use the registration date from your server, not from client-side cache:
void OnServerAuthResponse(AuthResponse response)
{
DateTime registrationDate = response.User.RegistrationDateUtc;
}
Common Mistakes
Don't Call for New Users
This method is only for users who existed before SDK integration:
void OnNewUserRegistered(UserData newUser)
{
}
void OnUserAuthenticated(UserData user)
{
if (user.RegistrationDate < SDKIntegrationDate)
{
}
}