---
title: "Boxever.getID()"
slug: "bx-getid"
abstract: "Describes the getID() function in the Boxever JavaScript Library (Sitecore CDP Stream API)."
---
# Boxever.getID()

The `getID()` function returns the [browser ID](https://doc.sitecore.com/cdp/en/developers/api/integrating-with-sitecore-cdp/understanding-integration-details/browser-id.html "Browser ID").

Every event that you send to Sitecore CDP must include the browser ID.

Use this function in every [event object](https://doc.sitecore.com/cdp/en/developers/api/stream-api/bx-js-library-legacy-reference/objects-1166464/event-object.html "Event object") you create and send to Sitecore CDP. See `[eventCreate()](bx-eventcreate.md "Boxever.eventCreate(event, callback, format)")`.

## Parameters

none

## Return value

string

## Example

Log the browser ID to the console:

```javascript
console.log(Boxever.getID());
// "a38b230c-11eb-4cf9-8d5d-274e9f344925​"

```