Rokt Documentation
  • Documentation
  • User Guide
  • SDK
  • API
  • Third-Party Integrations
  • Help

›Interfaces

Getting Started

  • Introduction

Web SDK

  • Overview
  • Architecture
  • Integrating the Web SDK
  • Integration Examples

    • Confirmation Page Integration
    • Preparative Iframe
    • Page Identifier
    • Single Page Applications
    • Brand Conversion Integration
    • In Transaction/Cart Integration
    • Event-based Integration
    • Sandbox Integration
  • Integration Best Practices
  • Attributes
  • Security
  • Mobile In-App Web Pages
  • API

    • README
    • Globals

    Enumerations

    • FailureReason

    Interfaces

    • Attributes
    • Cart
    • CartItem
    • PlacementCloseEvent
    • Rokt
    • RoktConfiguration
    • Widget

iOS SDK

  • Overview
  • Version
  • Integrating the SDK

    • Integrating and Initializing the SDK
    • Launching an Overlay Placement
    • Launching an Embedded Placement
    • Recording a Brand Conversion
    • Sandbox Integration
  • Attributes
  • Security

Android SDK

  • Overview
  • Version
  • Integrating the SDK

    • Integrating and Initializing the SDK
    • Launching an Overlay Placement
    • Launching an Embedded Placement
    • Recording a Brand Conversion
    • Sandbox Integration

    Attributes

    • Core Attributes
    • Vertical Attributes
  • Security

React Native SDK

  • Overview
  • Version
  • Integrating the SDK

    • Integrating and Initializing the SDK
    • Launching an Overlay Placement
    • Launching an Embedded Placement
    • Recording a Brand Conversion
    • Sandbox Integration

    Attributes

    • Core Attributes
    • Vertical Attributes
  • Security
Edit

Attributes

A dictionary of attributes to pass to Rokt to better tailor experience for a user.

example

{
  firstName: 'Alice',
  lastName: 'Smith',
}

Indexable

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

Any other attributes.

example

{
  firstName: 'Alice',
  lastName: 'Smith',
}

Properties

Optional country

• country? : undefined | string

User'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


Optional locale

• locale? : undefined | string

Locale to be used in displayed 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 provided Rokt will try to establish user's preferred locale based on browser's setting, user location or will use 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


Optional userAgent

• userAgent? : undefined | string

User's user agent, defaults to browser's user agent but can be overridden.

default Browser's user agent.

← FailureReasonCart →
  • Indexable
  • Properties
    • Optional country
    • Optional locale
    • Optional userAgent
RESOURCES
DocumentationUser GuideSDKAPIIntegration PartnersHelp
COMPANY
About UsContact UsCareersEngineering Blog
Rokt Documentation
Copyright © Rokt 2021 - All Rights Reserved