Legacy Android Tracking
Deprecated — do not use for new games
Legacy Android SDK is in maintenance-only mode and will be removed. New games must use SDK v2 Tracking.
The legacy Android SDK exposes lightweight tracking methods on OegSdk. These are typically wired after OegSdk.init(this) and use the mapping in trackingConfig.eventNameTokenMapping.
Configure tracking
Set tracking values in app/src/main/assets/oeg_config.json:
oeg_config.json
{
"trackingConfig": {
"adjustAppToken": "YOUR_ADJUST_APP_TOKEN",
"adjustEnvironment": "sandbox",
"eventNameTokenMapping": {
"login": "EVENT_TOKEN_LOGIN",
"registration": "EVENT_TOKEN_REGISTER",
"purchase": "EVENT_TOKEN_PURCHASE"
}
}
}
If adjustAppToken is empty, Adjust tracking is skipped.
Log custom events
OegSdk.logEvent("login", null)
OegSdk.logEvent(
"tutorial_complete",
mapOf(
"step" to 5,
"character" to "mage"
)
)
Use event names that exist in eventNameTokenMapping when you want the SDK to forward them to Adjust.
Log purchase revenue
OegSdk.logPurchase(
9.99,
"USD",
"TRANS_123456",
"product_123"
)
You can also pass an additional purchaseData map when your game needs extra metadata attached to the revenue event.
Recommended timing
- Call
OegSdk.logEvent(...)after important account or gameplay milestones. - Call
OegSdk.logPurchase(...)only after your server or gameplay logic has accepted the purchase result. - Keep event names stable across Android and iOS so dashboards remain comparable.