Installing Connect Surveys on Headless Instances

Standard Implementations

Introduction

There are multiple ways to configure and setup headless Connect. There are two main channels it supports:

  • on-site

  • post-checkout

Both channels support multiple different modes of configuration. Either by passing query string parameters to the script or by creating meta tags inside the page header.

On Site

To display an on site survey, the system chooses from a prioritised list of surveys for the on site channel. From highest priority down, the system choses the first active survey that matches conditions and that the user is eligible for answering.

To implement on site surveys, you can add our surveys script tag to the header of the page(s) with your store Shopify domain.

Example Usage

<script type="text/javascript"
        src="https://surveys.okendo.io/js/okendo-connect.headless.js?shop={your-store}.myshopify.com&channel=on-site&auto_initialise=true"
        async>
</script>

Parameters

These query string parameters can be added to the script src.

Post Checkout

To display a post checkout survey, the system chooses from a prioritised list of surveys for the post checkout channel. From highest priority down, the system choses the first active survey that matches conditions and that the user is eligible for answering.

Post-checkout requires extra data needed for the decision making process on which survey to display to a customer. This data is used to determine which post-checkout conditions and triggers match.

If only using a simple post checkout survey without conditions you can use the same setup as the above on site section.

If you want to use any of the following conditions, you will need to either use the javascript API properties or meta tags as explained below:

  • Order value is at least

  • Order value is at most

  • Purchased product

  • Cart contents do not include

  • New Customers

  • Repeat Customers

Example Usage

<html>
<head>
    <meta name="oke:subscriber_id" content="{your-subscriber-id}" />
    <meta name="oke:target_element_id" content="okendo-survey" />
    <meta name="oke:order_id" content="1508506" />
    <meta name="oke:order_subtotal_price" content="100.00" />
    <meta name="oke:cart_content_product_ids" content="6911181521050, 6911187714202" />
    <meta name="oke:auto_initialise" />
    <script type="text/javascript"
        src="https://surveys.okendo.io/js/okendo-connect.headless.js?channel=post-checkout" async>
    </script>
</head>
<body>
    <div style="width: 300px; height: 400px;">
        <div id="okendo-survey"></div>
    </div>
</body>
</html>

Parameters

The channel parameter needs to be provided as a query string parameter to the script src.

Tags

Custom Implementations

See the link below for details on API references to support your custom implementation.

Last updated