Boxever.browserCreate(object, callback, format)
The browserCreate()
function creates a browser ID and a guest reference.
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 |
An empty object. |
N/A |
|
function |
This callback function handles the response. |
The browser ID is in the The guest reference is in the |
|
string |
The format of the response. |
Set the value to |
Return value
undefined
Example
Call the browserCreate()
function. In the callback function, log the response to the console:
The following is logged to the console:
The ref
key contains the browser ID. The customer_ref
key contains the guest reference.