Console Commands

Run these in your browser's developer console (F12 or Cmd+Option+I) to inspect Shoplift's state.

Enable debug logging

Turns on verbose console logging for all Shoplift operations. Persists across page loads.

// Enable
window.shopliftInstance.setDebug(true);

// Disable
window.shopliftInstance.setDebug(false);

Dump full internal state

Outputs Shoplift's complete internal state object to the console — useful for support tickets or deep debugging.

window.shopliftInstance.debug();

Check if Shoplift is loaded

console.log(window.shoplift);
// Should log an object with isHypothesisActive, setAnalyticsConsent, getVisitorData

Inspect 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

Last updated

Was this helpful?