Skip to main content
Sitecore Documentation
  • Learn
  • Downloads
  • Changelog
  • Roadmap
CDPCloud Portal
Sitecore CDP Developer Documentation
  • Developing with Sitecore CDP
            • Boxever.eventCreate(event, callback, format)
            • Boxever.callFlows(flow, callback)
            • Boxever.addUTMParams(event)
            • Boxever.browserCreate(object, callback, format)
            • Boxever.browserShow(browserId, clientKey, callback, format)
            • Boxever.getBucketNumber([callback])
            • Boxever.getClientKey()
            • Boxever.getCookie(cookieName)
            • Boxever.getID()
            • Boxever.reset()
            • Boxever.setCookie(cookieName, cookieValue[, expiresIn])
            • Boxever.templating()
            • Boxever.triggerExperiences()
        • Troubleshooting
        • Release notes
  1. Functions
  1. Stream API
  2. Functions
  3. 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:

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

The following is logged to the console:

{
    "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.

If you have suggestions for improving this article, let us know!

Documentation Assistant

This assistant uses AI to generate responses based on Sitecore documentation. While it has access to official sources, answers may be incomplete or inaccurate and should not be considered official advice or support.
Powered by
k
kapa.ai
Protected by reCAPTCHA

© Copyright 2026, Sitecore A/S or a Sitecore affiliated company.
All rights reserved.

Privacy policySitecore Trust CenterTerms of use