Console Commands
Enable debug logging
// Enable
window.shopliftInstance.setDebug(true);
// Disable
window.shopliftInstance.setDebug(false);Dump full internal state
window.shopliftInstance.debug();Check if Shoplift is loaded
console.log(window.shoplift);
// Should log an object with isHypothesisActive, setAnalyticsConsent, getVisitorDataInspect visitor data
const data = window.shoplift.getVisitorData();
console.log('Visitor:', data.visitor);
console.log('Tests:', data.visitorTests);View visitor data as a table
List all active test assignments
Test a specific hypothesis
Check consent state
Last updated
Was this helpful?