Core API Reference
API Overview
window.shoplift = {
// Check if visitor is assigned to a test variant
isHypothesisActive(hypothesisId: string): Promise<boolean>
// Manage visitor analytics consent
setAnalyticsConsent(consent: boolean): Promise<void>
// Get visitor and test data
getVisitorData(): VisitorData
}Method Reference
Method
Purpose
Returns
Async
Most Common Usage
Reference Documentation
The window.shoplift Object
isHypothesisActive()
setAnalyticsConsent()
getVisitorData()
TypeScript Support
Common Patterns
Basic Implementation
With Error Handling
Last updated
Was this helpful?