Installing widget on selected pages
Step 1: Define Included/Excluded Pages
const projectId = "63b711fa2ef2e4001a5e4977";
let attributes = {};
if (
(window.location.href.indexOf('/cds') >= 0) ||
(window.location.href.indexOf('%2Fcds') >= 0) ||
(window.location.href.indexOf('/dashboard') >= 0) ||
(window.location.href.indexOf('%2Fdashboard') >= 0)
) {
// Pages to exclude: do not start the widget
} else if (
((window.location.href.indexOf('/login') >= 0) ||
(window.location.href.indexOf('%2Flogin') >= 0) ||
(window.location.href.indexOf('/signup') >= 0) ||
(window.location.href.indexOf('%signup') >= 0)
) && screen.width < 800
) {
// Also exclude these pages on mobile devices
} else {
// startWidget()
}Step 2: Define the startWidget Function
Step 3: Additional Control Functions
Step 4: Custom Authentication
Step 5: Testing and Verification
Last updated