Skip to main content

Attributes

Overview

A dictionary of attributes to include in your Rokt integration to better tailor the experience for a customer.

Example

{
firstname: 'Alice',
lastname: 'Smith',
}

Indexable

  • [ attributeKey: string]: string | number | boolean | undefined | null

Any predefined or custom attributes for the integration.

See Partner attributes for information on predefined attributes.

Example

{
email: 'alice.smith@example.com',
firstname: 'Alice',
lastname: 'Smith',
}

Properties

country (optional)

country? : undefined | string

Customer's country code. If no Attributes.locale has been provided and other methods used by Rokt are not sufficient, Rokt can use country value to drive selection of a language to display on placements. The format of the value should adhere to ISO 3166-1 alpha-2 country code.

Example: US

Example: AU

See Attributes.locale for information on requesting a language to display


locale (optional)

locale? : undefined | string

Locale to be used when displaying placements. If your site supports multiple languages, you can use locale to request placements to be displayed in the language determined based on the attribute value. If no value is provided, Rokt tries to establish a customer's preferred locale based on browser setting, customer location, or your configured settings.

The format of the value should adhere to ISO639-1 language code with an optional hyphen separated ISO3166-1 alpha-2 country code.

Example: en

Example: en-AU

Was this article helpful?