Skip to main content
Skip table of contents

User Properties in Mobile SDK

image-20250902-073646.png

Zeta’s Mobile SDK provides a flexible way to capture user properties that help personalize engagement, track behaviors, and optimize experiences. By default, the SDK supports identification and collection of standard properties (such as user ID, email, and phone number).

In addition, you can extend the SDK to collect custom user properties. This allows you to define and capture attributes relevant to your unique business and user context—going beyond the defaults to model what truly matters for your customer experience.

Standard User Properties

The SDK provides built-in support for collecting commonly used properties:

Category

Property

Description

Identity

uid

Your app’s stable user identifier. Setting this starts an identity session.

Identity

name, firstName, lastName

Display and structured names.

Identity

source

Optional source tag for where/how the user was created.

Lifecycle

signedUpAt

ISO‑8601 UTC timestamp when the user signed up.

Contact

email

Email address; supports additional info (subscription status, preferences, timestamps, custom contact properties).

Contact

phone

Phone number; supports additional info (type, opt‑in, timestamps, custom contact properties).

Device

Push token

Device push token for notifications.

Device

IDFA, IDFV (iOS)

Apple advertising/vendor identifiers, if available and permitted.

Location

latitude, longitude, isForeground

Last known coordinates and capture state.

System

BSIN (read‑only)

Zeta’s unique user identifier; retrievable from the SDK and via delegate.

These properties are typically set during the user identification process.

For more details, see User Identification in the iOS SDK.


Collecting Custom Properties

Every business has unique attributes it needs to capture, such as loyalty tier, preferred language, subscription type, or even app-specific behaviors.

The SDK supports this through custom user property collection. You can define any key-value pair and attach it to the user profile.

Example (iOS SDK – Swift)

CODE
// Setting standard properties
ZetaSDK.shared.setUserId("user_12345")
ZetaSDK.shared.setEmail("jane.doe@example.com")

// Setting custom properties
let customProperties: [String: Any] = [
    "loyalty_tier": "Gold",
    "preferred_language": "French",
    "subscription_status": "active"
]

ZetaSDK.shared.setCustomProperties(customProperties)

Example (iOS SDK – Objective-C)

CODE
// Setting standard properties
[[ZetaSDK shared] setUserId:@"user_12345"];
[[ZetaSDK shared] setEmail:@"jane.doe@example.com"];

// Setting custom properties
NSDictionary *customProperties = @{
    @"loyalty_tier": @"Gold",
    @"preferred_language": @"French",
    @"subscription_status": @"active"
};

[[ZetaSDK shared] setCustomProperties:customProperties];

Best Practices

  • Keep keys consistent: Define a schema for your property names (e.g., snake_case or camelCase).

  • Use meaningful values: Ensure values are descriptive and can be used effectively in segmentation.

  • Avoid sensitive data: Do not send sensitive identifiers such as passwords or financial details.

  • Test before release: Validate custom properties in your staging environment before going live.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.