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.getCookie(cookieName)

Boxever.getCookie(cookieName)

The getCookie() functions receives a cookie name and returns the corresponding cookie value.

Note

This function only works for cookies set by the Boxever JavaScript Library and for cookies set using the setCookie() function.

Parameters

Parameter

Type

Description

Note

cookieName

string or number

The name of the cookie.

N/A

Return value

string

Example

Call the getCookie() function:

RequestResponse
console.log(Boxever.getCookie("_example_cookie_name_"));
// "_example_cookie_value_"

Do you have some feedback for us?

If you have suggestions for improving this article,

Privacy policySitecore Trust CenterCopyright © 1999-2025 Sitecore