For the complete documentation index, see llms.txt. This page is also available as Markdown.

Recart on-site methods

Documents the public methods on the window._recart object for controlling opt-in tools on your site.

These methods are available on the global Recart object via window._recart.

Public methods

isReady

isReady(): boolean

showOptinTool

/*
 * triggers the optin tool to show up (currently only handles popups)
 * @param {string} optinToolId - The id of the optin tool to show
 * @param [options] options - Options
 * @param [options.force] - when force is true it shows the popup even if another popup is already visible
 */
showOptinTool(optinToolId: string, options?: { force: boolean }): void

getActiveOptinToolInExperiment

/*
 * returns the optin tool that has been evaluated active in the experiment
 * @param {string} experimentId - The id of the experiment to query
 * @returns {string | null} returns the id of the evaluated optin tool or returns null when no data found
 */
getActiveOptinToolInExperiment(experimentId: string): string | null

isSubscriberIdentified

hasSubscribedToOptinTool

Last updated

Was this helpful?