Skip to main content
Users
CloudPortalLogin
  • Powered byPowered by
Developing with Sitecore Personalize
Data privacy
Before you start sending data
Integrating with Sitecore Personalize
Stream API
Personalize API Flow execution
REST APIs
  • Sitecore Personalize for developers
  • Stream API
  • Boxever JavaScript Library (legacy) reference
  • Functions
  • Boxever.browserCreate(object, callback, format)

Boxever.browserCreate(object, callback, format)

The browserCreate() function creates a browser ID and a guest reference.

Important

The Boxever JavaScript Library calls this function automatically when no browser ID is found in the cookies or in local storage. We recommend that you do not call this function. To create a browser ID or guest reference manually, use the reset() function instead.

Parameters

Parameter

Type

Description

Note

object

object

An empty object.

N/A

callback

function

This callback function handles the response.

The browser ID is in the ref key of the parameter that is passed to the callback function.

The guest reference is in the customer_ref key of the parameter that is passed to the callback function.

format

string

The format of the response.

Set the value to "json". Other formats are not supported.

Return value

undefined

Example

Call the browserCreate() function. In the callback function, log the response to the console:

RequestResponse
Boxever.browserCreate(
    {},
    response => console.log(response),
    "json"
);

The following is logged to the console:

RequestResponse
{
    "status": "OK",
    "version": "1.2",
    "client_key": "ZpHxO9WvLOfQRVPlvo0BqB8YjGYuFfNe",
    "ref": "a38b230c-11eb-4cf9-8d5d-274e9f344925​",
    "customer_ref": "f7aabbca-1c1b-4fc2-be72-3e16294a4f03"
}

The ref key contains the browser ID. The customer_ref key contains the guest reference.

Do you have some feedback for us?

If you have suggestions for improving this article,

Privacy policySitecore Trust CenterCopyright © 1999-2025 Sitecore