Skip to content

Storage

Learn about the different device-level properties that are stored by the Braze SDK.

Device properties

By default, Braze will collect the following device-level properties to allow device, language, and time zone-based message personalization:

  • AD_TRACKING_ENABLED
  • ANDROID_VERSION
  • CARRIER
  • IS_BACKGROUND_RESTRICTED
  • LOCALE
  • MODEL
  • NOTIFICIATION_ENABLED
  • RESOLUTION
  • TIMEZONE
  • Device Carrier (see note on the CTCarrier deprecation)
  • Device Locale
  • Device Model
  • Device OS Version
  • Push Authorization Status
  • Push Display Options
  • Push Enabled
  • Device Resolution
  • Device Time Zone
  • BROWSER
  • BROWSER_VERSION
  • LANGUAGE
  • OS
  • RESOLUTION
  • TIME_ZONE
  • USER_AGENT

By default, all properties are enabled. However, you can choose to enable or disable them manually. Keep in mind, some Braze SDK features require specific properties (such as local time zone delivery and time zone), so be sure to test your configuration before releasing to production.

For example, you can specify the Android OS version and device locale to be allowlisted. For more information, see the setDeviceObjectAllowlistEnabled() and setDeviceObjectAllowlist() methods.

1
2
3
new BrazeConfig.Builder()
    .setDeviceObjectAllowlistEnabled(true)
    .setDeviceObjectAllowlist(EnumSet.of(DeviceKey.ANDROID_VERSION, DeviceKey.LOCALE));

For example, you can specify time zone and locale collection to be allowlisted. For more information, see the devicePropertyAllowList property of the configuration object.

1
configuration.devicePropertyAllowList = [.timeZone, .locale]
1
2
3
4
configuration.devicePropertyAllowList = @[
    BRZDeviceProperty.timeZone,
    BRZDeviceProperty.locale
];

For example, you can specify the device language to be allowlisted. For more information, see refer to the devicePropertyAllowlist option for InitializationOptions.

1
2
3
4
5
import * as braze from"@braze/web-sdk";
braze.initialize("API-KEY", {
    baseUrl: "BASE-URL",
    devicePropertyAllowlist: [ braze.DeviceProperties.LANGUAGE ] // list of `DeviceProperties` you want to collect
});

Storing cookies (web only)

After initializing the Web Braze SDK it’ll create and store cookies with a 400-day expiration that automatically renews on new sessions.

The following cookies are stored:

Disabling cookies

To disable all cookies, use the noCookies option when initializing the Web SDK. This will prevent you from associating anonymous users who navigate across sub-domains and will result in a new user on each subdomain.

1
2
3
4
5
import * as braze from"@braze/web-sdk";
braze.initialize("API-KEY", {
    baseUrl: "BASE-URL",
    noCookies: true
});

To stop Braze tracking in general, or to clear all stored browser data, see the disableSDK and wipeData SDK methods, respectively. These two methods can be useful should a user revoke consent or you want to stop all Braze functionality after the SDK has already been initialized.

HOW HELPFUL WAS THIS PAGE?
New Stuff!