> For the complete documentation index, see [llms.txt](https://rosetta-ai.gitbook.io/tutorials/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://rosetta-ai.gitbook.io/tutorials/javascript-sdk/advanced-setup.md).

# Advanced Setup

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

Read our [quickstart](/tutorials/javascript-sdk/quick-start.md) 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 `userId`s (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

```javascript
rosetta('userID', 'userId')
```

### User Mapping Examples

#### User ID is a `String`

```javascript
rosetta('userID', 'u101')
```

#### User ID is an `Integer`

```javascript
rosetta('userID', 111)
```
