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.
Name | Description | Sample |
---|---|---|
| Okendo subscriber id for connecting to your store. |
|
| Shopify domain for connecting to your store. |
|
| The survey channel being implemented. |
|
| Optional target element id in which to display an embedded survey. |
|
| Order id to associate with the customer and survey response. |
|
| Price of the order used for order value conditions as well as revenue attribution. |
|
| Used to attribute orders to survey responses. |
|
| An array of product ids being purchased. Used for cart content conditions. |
|
Functions
setup
Initialises the surveys scripts on the page.
Example Usage
Properties
Before calling setup
, you should set the properties below.
Name | Description |
---|---|
| Either subscriberId or apiDomain is required. |
| Either subscriberId or apiDomain is required. |
|
|
| An optional target element id to place an embedded survey in. |
Parameters
Parameter | Description | Value Type | Supported Values | Required |
---|---|---|---|---|
| Supress all page event triggers to allow manually triggering custom event surveys after initialisation. |
|
|
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
Properties
You should set one of these properties before you can raise a custom event.
Name | Description |
---|---|
| Either subscriberId or apiDomain is required. |
| Either subscriberId or apiDomain is required. |
Parameters
Parameter | Description | Value Type | Supported Values | Required |
---|---|---|---|---|
| The name of the event on the survey to show. |
| ||
| Flag to ignore all display rules and show the survey. Defaults to |
|
|
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
Parameters
Parameter | Description | Value Type | Required |
---|---|---|---|
| The product id being added to cart. |
|
removeFromCart
Raise a remove from cart event to trigger any remove from cart surveys.
Example Usage
Parameters
Parameter | Description | Value Type | Required |
---|---|---|---|
| The product id being removed from cart. |
|
Last updated