---
title: "Boxever.getID()"
slug: "bx-getid"
abstract: "Boxever JavaScriptライブラリ(Sitecore CDP Stream API)内のgetID()関数を記述します。"
---
# Boxever.getID()

getID()関数は[ブラウザのID](https://doc.sitecore.com/cdp/ja/developers/api/integrating-with-sitecore-cdp/understanding-integration-details/browser-id.html "Browser ID")を返します。

Sitecore CDPに送信するすべてのイベントにはブラウザIDを含める必要があります。

この関数は作成してSitecore CDPに送信するすべての [イベントオブジェクト](https://doc.sitecore.com/cdp/ja/developers/api/stream-api/bx-js-library-legacy-reference/objects-1166464/event-object.html "Event object") で使ってください。参照eventCreate()(bx-eventcreate.md "Boxever.eventCreate(event, callback, format)")。

## パラメータ

なし

## リターンバリュー

ストリング

## 例

ブラウザIDをコンソールにログ登録してください:

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