Available Session Objects
| Object | Description |
|---|---|
window.__CHECKOUT_SESSION__ | Ollie Shop’s normalized session with a consistent structure across all platforms |
window.__RAW_CHECKOUT_SESSION__ | The raw session data from your e-commerce platform (VTEX, Shopify, etc.) |
Use
__CHECKOUT_SESSION__ for a consistent data structure regardless of your e-commerce platform. Use __RAW_CHECKOUT_SESSION__ when you need platform-specific fields not available in the normalized version.Ollie Shop Session Structure
The__CHECKOUT_SESSION__ object provides a clean, normalized structure:
Full Session Example
Full Session Example
Key Properties
| Property | Type | Description |
|---|---|---|
id | string | Unique session identifier |
cartItems | array | Products in the cart with normalized properties |
user | object | User information including isGuest status |
locale | object | Currency, country, and language settings |
totals | object | Order totals (items, shipping, discounts, total) |
shipping | object | Shipping addresses, packages, and available quotes |
payment | object | Available payment methods and selected payments |
Raw Platform Session (VTEX Example)
The__RAW_CHECKOUT_SESSION__ object contains the unmodified data from your e-commerce platform. This example shows the VTEX orderForm structure:
Full VTEX Session Example
Full VTEX Session Example
For a complete reference of all VTEX orderForm fields, see the VTEX orderForm Fields documentation.
Accessing Session Data
In Custom Components
Use theuseCheckoutSession hook to access session data reactively in your components:
In GTM Custom HTML Tags
Access the global objects directly in GTM Custom HTML tags:Related
- useCheckoutSession Hook — React hook for accessing session data
- Enriching Events with GTM — Use session data in GTM tags