Skip to content

Mobile Tracking API Reference

CustomerLabs Mobile Tracking enables you to collect, unify, and activate user behavioural data from your mobile application. By integrating with the CustomerLabs API, you can track anonymous and identified users across sessions, stitch identities across platforms using advertising IDs and external identifiers, and send structured events to any downstream destination.

Before sending data to CustomerLabs, your mobile app must collect the following fields. These are passed across the three core API endpoints.

FieldTypeDescription
app_idstringCustomerLabs application identifier
aaid / idfastringAdvertising ID — AAID on Android, IDFA on iOS
limitAdTrackingbooleanUser’s ad tracking permission (true = limited, false = allowed)
sessionIdstringSession identifier, generated as CL- + UUIDv4 for each new session. Stored in mobile local storage.
user_idstringUser identifier, generated as app_id + UUIDv4 on first visit. Stored in mobile local storage.
appPackageNamestringApplication package name / bundle ID
app_version_namestringApp version name
carrierstringMobile carrier name
deviceModelNamestringDevice model identifier
deviceTimeZonestringDevice timezone (e.g., Asia/Kolkata)
extInfoVersionstringPlatform identifier — i2 for iOS, a2 for Android
externalStorageSizestringTotal external storage in GB
fingerprintstringDevice build fingerprint
freeSpaceExternalStoragestringFree external storage in GB
localestringDevice locale (e.g., en-US)
longVersionstringApp long version string
osVersionstringOS version number
screenDensitystringScreen pixel density
screenHeightstringScreen height in dp
screenWidthstringScreen width in dp
shortVersionstringApp short version string
user_agentstringWebView user agent string
FieldTypeDescription
fcmTokenstringFirebase Cloud Messaging token
google_analytics__app_instance_idstringGoogle Analytics app instance identifier
google_analytics__app_session_idstringGoogle Analytics session identifier

All endpoints require the following headers:

HeaderValue
Content-Typeapplication/json
CL-User-Agent<user_agent>

URL: https://io.v2.customerlabs.co/app/externalIds Method: POST

Call this endpoint at the start of every session — for both new and returning users. It registers the device’s advertising IDs, device metadata, and UTM parameters with CustomerLabs to enable cross-platform identity stitching.

{
"id": "app_id",
"uid": "user_id",
"sid": "session_id",
"external_ids": {
"idfa": "idfa_value",
"aaid": "aaid_value",
"google_analytics__app_instance_id": "ga_app_instance_id",
"google_analytics__app_session_id": "ga_session_id",
"customerlabs_user_id": "user_id"
},
"additional_info": {
"limitAdTracking": "limitAdTracking_value",
"fcmToken": "fcmToken_value",
"user_agent": "user_agent_value",
"appPackageName": "appPackageName_value",
"app_version_name": "app_version_name_value",
"carrier": "carrier_value",
"deviceModelName": "deviceModelName_value",
"deviceTimeZone": "deviceTimeZone_value",
"extInfoVersion": "extInfoVersion_value",
"externalStorageSize": "externalStorageSize_value",
"fingerprint": "fingerprint_value",
"freeSpaceExternalStorage": "freeSpaceExternalStorage_value",
"locale": "locale_value",
"longVersion": "longVersion_value",
"osVersion": "osVersion_value",
"screenDensity": "screenDensity_value",
"screenHeight": "screenHeight_value",
"screenWidth": "screenWidth_value",
"shortVersion": "shortVersion_value",
"fbclid": "fbclid_value",
"gclid": "gclid_value",
"msclkid": "msclkid_value",
"wbraid": "wbraid_value"
},
"utm_params": {
"utm_source": "utm_source_value",
"utm_medium": "utm_medium_value",
"utm_campaign": "utm_campaign_value",
"utm_content": "utm_content_value",
"utm_term": "utm_term_value"
}
}
FieldTypeRequiredDescription
idstringYesCustomerLabs application identifier (app_id) used to route data to the correct account
uidstringYesUnique user identifier (app_id + UUIDv4), persisted in mobile local storage to track the user across sessions
sidstringYesSession identifier (CL- + UUIDv4), regenerated for each new app session to group events within a single visit
external_idsobjectYesMap of third-party identifiers (IDFA, AAID, GA app instance ID, GA session ID, CustomerLabs user ID) used to stitch user identity across platforms
additional_infoobjectYesDevice metadata, ad click IDs, and app details used for audience segmentation and ad platform matching
utm_paramsobjectNoUTM campaign parameters captured from the deep link or referral URL that initiated the app session
StatusDescription
200 OKSuccess
400 Bad RequestValidation error
500 Internal Server ErrorServer error
{
"user_id": "user_id",
"external_ids": { "...": "..." },
"additional_info": { "...": "..." }
}

URL: https://io.v2.customerlabs.co/app/identify Method: POST

Call this endpoint when a user logs in or when you have identifiable user information (email, phone). This links the anonymous device identity to a known user profile and enriches the profile with user traits.

{
"id": "app_id",
"uid": "user_id",
"sid": "sessionId",
"event_source": "mobile_app",
"added_at": "2026-03-12T05:45:15Z",
"identify_by": {
"identify_by_email": "[email protected]",
"identify_by_phone": "+918424032105"
},
"traits": {
"first_name": "Nelson",
"last_name": "Jaffery",
"email": "[email protected]",
"phone": "+918424032105",
"gender": "male",
"age": 25,
"country": "India",
"state": "Maharashtra",
"city": "Thane",
"zip": "400601",
"address1": "Line 1",
"address2": "Line 2",
"address3": "Line 3"
},
"external_ids": {
"idfa": "idfa_value",
"aaid": "aaid_value",
"google_analytics__app_instance_id": "ga_app_instance_id",
"google_analytics__app_session_id": "ga_session_id",
"customerlabs_user_id": "user_id"
}
}
FieldTypeRequiredDescription
idstringYesCustomerLabs application identifier (app_id)
uidstringYesUnique user identifier (app_id + UUIDv4), persisted in mobile local storage
sidstringYesSession identifier (CL- + UUIDv4), regenerated for each new app session
event_sourcestringYesEvent source — set to mobile_app for mobile app events
added_atstringYesEvent timestamp in ISO 8601 format (e.g., 2026-03-12T05:45:15Z)
identify_byobjectYesUsed to search for and match the user. Accepts identify_by_email and/or identify_by_phone. All traits in the request will be assigned to the matched user profile.
traitsobjectYesMap of user profile attributes: first_name, last_name, email, phone, gender, age, country, state, city, zip, address1, address2, address3
external_idsobjectYesMap of third-party identifiers used to stitch user identity across platforms
StatusDescription
200 OKSuccess
400 Bad RequestValidation error
500 Internal Server ErrorServer error
{
"user_id": "user_id",
"external_ids": { "...": "..." },
"additional_info": { "...": "..." },
"user_traits": { "...": "..." }
}

URL: Your Webhook URL from CustomerLabs Source Configuration Method: POST

Call this endpoint to track user actions and behavioural events (e.g., View Item, Add to Cart, Purchase, Search). The Webhook URL is unique per CustomerLabs source — retrieve it from your CustomerLabs dashboard under Sources → [Your Mobile Source] → Source Configuration.

{
"id": "app_id",
"uid": "user_id",
"sid": "sessionId",
"event_name": "Purchase",
"event_source": "mobile_app",
"added_at": "2026-03-12T05:45:15Z",
"identify_by": {
"identify_by_email": "[email protected]",
"identify_by_phone": "+918424032105"
},
"properties": {
"value": 100,
"currency": "USD",
"transaction_id": "TXN-12345",
"shipping": 10,
"tax": 10,
"discount": 10,
"coupon": "SAVE10",
"affiliation": "affiliation_value",
"search_string": "running shoes",
"description": "description_value"
},
"products": [
{
"product_id": "SKU-001",
"product_name": "Running Shoes",
"product_price": 100,
"product_quantity": 1
}
],
"utm_params": {
"utm_source": "utm_source_value",
"utm_medium": "utm_medium_value",
"utm_campaign": "utm_campaign_value",
"utm_content": "utm_content_value",
"utm_term": "utm_term_value"
}
}
FieldTypeRequiredDescription
idstringYesCustomerLabs application identifier (app_id)
uidstringYesUnique user identifier (app_id + UUIDv4), persisted in mobile local storage
sidstringYesSession identifier (CL- + UUIDv4), regenerated for each new app session
event_namestringYesName of the event (e.g., View Item, Add to Cart, Purchase, Search)
event_sourcestringYesEvent source — set to mobile_app for mobile app events
added_atstringYesEvent timestamp in ISO 8601 format (e.g., 2026-03-12T05:45:15Z)
identify_byobjectYesUsed to match the event to a known user profile. Accepts identify_by_email and/or identify_by_phone.
propertiesobjectYesMap of event properties: value, currency, transaction_id, shipping, tax, discount, coupon, affiliation, search_string, description
productsarrayNoArray of product objects for e-commerce events. Each object supports: product_id, product_name, product_price, product_quantity
utm_paramsobjectNoUTM campaign parameters from the deep link or referral URL that initiated the app session
StatusDescription
200 OKSuccess — header only, no response body
400 Bad RequestValidation error
500 Internal Server ErrorServer error
{
"validation_error": {
"error_message": "error_message"
}
}

  • user_id — Generated once on first app install as app_id + UUIDv4. Persisted in mobile local storage and reused across all subsequent sessions.
  • session_id — Generated as CL- + UUIDv4 at the start of every new app session. Stored in mobile local storage for the duration of the session.
  • Use external_ids (AAID/IDFA, GA IDs) to stitch anonymous mobile users with ad platform identities.
  • Use identify_by_email or identify_by_phone in the identify_by object to link events and traits to a known user profile.
  • Once a user is identified via /app/identify, all subsequent events carrying the same identify_by value will be attributed to that profile.

Set extInfoVersion based on the platform:

PlatformValue
iOSi2
Androida2

Always collect and pass limitAdTracking:

ValueMeaning
falseUser has allowed ad tracking — AAID/IDFA available
trueUser has restricted ad tracking — AAID/IDFA may be zeroed out

All added_at values must be in ISO 8601 format with UTC timezone.

The Events Tracking endpoint URL is unique per CustomerLabs source. Retrieve your Webhook URL from:

CustomerLabs Dashboard → Sources → [Your Mobile Source] → Source Configuration