API Overview
Get up and running with the Shoplift JavaScript API in minutes.
Getting Started
How the Script Loads
The window.shoplift Object
window.shoplift Objectinterface ShopliftAPI {
isHypothesisActive(hypothesisId: string): Promise<boolean>;
setAnalyticsConsent(consent: boolean): Promise<void>;
getVisitorData(): VisitorData;
}
declare global {
interface Window {
shoplift?: ShopliftAPI;
}
}Method
Purpose
Returns
Async
Quick Start
Safely Checking for Shoplift
When to Use the JavaScript API
Last updated
Was this helpful?