Rosetta.ai Documentation
  • Home
  • JavaScript SDK
    • Quick Start
    • Advanced Setup
  • Get Started
    • What is Rosetta.ai
    • How Rosetta.ai Works
    • Quick Start
  • Concepts
    • Scenario
    • Engine
    • Entity
    • Event
    • Query
    • Preference Factor
    • Preference Attribution
    • Product Feed
  • FAQ
  • Products
    • Preference
      • Preference Profile
      • Preference Attribution
    • Personalization
      • On-site Recommendations
      • Off-site Messages
  • Topics
    • Pricing
      • Subscription
      • Commission
    • Enterprise
    • Development
    • Partners
  • Solutions
    • Fashion
  • SDKs
    • rosetta-web.js
  • Plugins
    • Shopline
    • Waca
    • API Reference
Powered by GitBook
On this page
  • User Mapping
  • User Mapping Definition
  • User Mapping Examples

Was this helpful?

  1. JavaScript SDK

Advanced Setup

Document describing some more of the advanced features available for Rosetta.ai's JavaScript source.

PreviousQuick StartNextGet Started

Last updated 4 years ago

Was this helpful?

Read our guide to learn how to load and initialize the Rosetta.ai SDK for JavaScript. While the quickstart guides you through the necessary components for minimum implementation, this guide will take you through some of the optional, advanced features.

User Mapping

Rosetta.ai SDK for JavaScript automatically generates a unique identifier anonymousId for your users. The userID method is how you associate your users and their actions to recognizable userIds (usually mapped to your own database of user identifiers).

In turn, this allows you to more easily accomplish:

  • Cross Device tracking

  • Retargeting

User Mapping Definition

rosetta('userID', 'userId')

User Mapping Examples

User ID is a String

rosetta('userID', 'u101')

User ID is an Integer

rosetta('userID', 111)
quickstart