Skip to content

Web Tracker SDK Reference ​

Use these reference after the SDK is loaded and initialized. Start with registration, then track downstream actions in the order they occur for clearer attribution.

Event reporting APIs ​

trackRegister ​

Bind the first unique user identifier; all later events attach to this account.

js
tracker.trackRegister('user_123', {
  identifier: 'hashed_email_or_phone'
});
ParameterTypeRequiredDescription
user_idstringYesUnique user ID.
identifierstringNoHashed email or phone for de-duplication.

trackDeposit ​

Record money moving in for conversion and risk analysis.

js
tracker.trackDeposit('user_123', {
  currency: 'USDT',
  network: 'TRON',
  amount: 100
});
ParameterTypeRequiredDescription
user_idstringYesUnique user ID.
currencystringYesCurrency code, e.g., USDT.
networkstringYesPayment rail or chain, e.g., TRON.
amountnumberYesAmount value.

trackEnterGame ​

Capture when the user starts the core experience (game or key flow).

js
tracker.trackEnterGame('user_123', {
  currency: 'USDT',
  game_provider: 'provider_xyz',
  game_id: 'gamer_123',
  game_name: 'My Awesome Game'
});
ParameterTypeRequiredDescription
user_idstringYesUnique user ID.
currencystringYesSelected denomination.
game_providerstringYesProvider or partner name.
game_idstringYesInternal game or feature ID.
game_namestringYesGame or experience display name.

trackLogin ​

Confirm returning users and continue the same account session.

js
tracker.trackLogin('user_123');
ParameterTypeRequiredDescription
user_idstringYesUnique user ID.

trackDownloadClick ​

Mark when a user triggers a download or store jump from the page.

js
tracker.trackDownloadClick('user_123', {
  store_type: 'App Store'
});
ParameterTypeRequiredDescription
user_idstringNoUnique user ID.
store_typestringNoChannel of the download, e.g., App Store or Play Store.
targetstringNoWhere the tap sends the user, e.g. af (an AppsFlyer click link) or fallback (your own store/offer link), so download clicks can be reconciled against your MMP's click count. Omitted from the event when not set. Requires SDK 1.4.5+.

trackDownloadClickRegister ​

Mark when a user triggers a download or store jump tied to a registration flow.

js
tracker.trackDownloadClickRegister('user_123', {
  store_type: 'App Store',
  identifier: 'hashed_email_or_phone'
});
ParameterTypeRequiredDescription
user_idstringNoUnique user ID.
store_typestringNoChannel of the download, e.g., App Store or Play Store.
identifierstringNoHashed email or phone number.
targetstringNoWhere the tap sends the user, e.g. af (an AppsFlyer click link) or fallback (your own store/offer link), so download clicks can be reconciled against your MMP's click count. Omitted from the event when not set. Requires SDK 1.4.5+.

trackCustomEvent ​

Add business-specific events such as mission complete or item purchase.

js
tracker.trackCustomEvent('custom_event_type', {
  event_detail: 'value'
});
ParameterTypeRequiredDescription
event_typestringYesCustom event name.
payloadobjectNoKey-value payload for the event.

Utility reference ​

getClickid() ​

Returns the stored clickid from UTM data. If the URL contains ?clickid=..., the SDK extracts and saves it automatically.

The click ID is kept in a first-party cookie for 30 days, matching the attribution window. On iOS / Safari, ITP may clear it sooner. Call this at registration and store the value on the user's record — see Store the click ID at registration.

js
const clickid = tracker.getClickid();
if (clickid) {
  console.log('Click ID:', clickid);
}

Returns: string | null

getVersion() ​

Returns the current SDK version string.

js
const version = tracker.getVersion();
console.log('SDK Version:', version);

Returns: string