Quizzes - Connect Window API
Last updated
Last updated
The Connect Window API exposes public functions that can be called to show or configure custom events for quizzes to be displayed on the page.
showQuiz
The showQuiz
event can optionally be used to trigger display of Okendo Quizzes on your storefront in a modal.
Parameter | Description | Value Type | Required |
---|---|---|---|
recommendedProductMounted
The recommendedProductMounted
event is triggered when an individual product recommendation is mounted in the application. It provides an opportunity for merchants to insert custom HTML or other custom product display functionality, allowing them to further customize the presentation of recommended products.
recommendedProductsMounted
The recommendedProductsMounted
event is triggered when all product recommendations are mounted in the application. It provides an opportunity for merchants to insert custom HTML or other custom product display functionality for the entire recommendation page. This allows merchants to have full control over the presentation of the entire recommendation section.
generateCartLineItemProperties
The generateCartLineItemProperties
event is triggered when a product is added to the cart from the recommendation page. It provides an opportunity for merchants to insert custom data into the cart line items, allowing them to enhance the cart experience with personalized information.
oke_quizCapture_addToCart
The oke_quizCapture_addToCart
event is used by Okendo Quizzes to notify the store that a customer intends to “Add to Cart” one or more recommended products.
Typically used in headless implementations. See the below guide for an explanation and examples of how to setup quizzes on headless instances:
Parameter | Description | Value Type | Required |
---|---|---|---|
Parameter | Description | Value Type | Required |
---|---|---|---|
Parameter | Description | Value Type | Required |
---|---|---|---|
channelQuizId
Can be found in the install dialog of your quiz
string
subscriberId
Your Okendo customer identifier.
string
sectionContent
HTML of the recommended product to be rendered.
html
product
A payload representing the product to be recommended.
JSON
recommendationSection
The html element representing the entire recommendation section.
html
products
A JSON object representing all recommended products to be displayed on the recommendation page.
JSON
addToCartButtonId
id of the add to cart button element that was clicked
string
product
A JSON object representing the product that was added to the cart from the recommendation page.
JSON