Surveys - Connect Window API

The Connect Window API exposes public functions that can be called to setup or make configuration changes to surveys to be displayed on the page.

Properties

This is a list of all properties that can be set on the window API.

Functions

setup

Initialises the surveys scripts on the page.

Example Usage

window.okeConnectApi.setup();

Properties

Before calling setup, you should set the properties below.

Parameters

raiseCustomEvent

Raise a custom event to potentially trigger a given survey. Display frequency rules are followed by default which can prevent a survey from being displayed to a given user for example if they have already answered the survey in their session.

Example Usage

window.okeConnectApi.raiseCustomEvent('product-survey');

Properties

You should set one of these properties before you can raise a custom event.

Parameters

addToCart

Raise an add to cart event to trigger any add to cart surveys or to support a remove from cart trigger later. Add and remove from cart events rely on a cached list of products to store state between events.

Example Usage

window.okeConnectApi.addToCart('11223344');

Parameters

removeFromCart

Raise a remove from cart event to trigger any remove from cart surveys.

Example Usage

window.okeConnectApi.removeFromCart('11223344');

Parameters

Last updated