All Collections
Getting Started
Universal Embed - for WooCommerce, BigCommerce and any platform outside of Shopify
Universal Embed - for WooCommerce, BigCommerce and any platform outside of Shopify
Jeremiah Prummer avatar
Written by Jeremiah Prummer
Updated over a week ago

Available on every plan.

KnoCommerce is fully platform agnostic. We currently work natively with Shopify, and official integrations will be coming with WooCommerce, BigCommerce, and others.

Using Google Tag Manger? Go here

If you are using one of those platforms (or a custom build!) you can get started today with a custom script. Here's how to do that. 👇


Step 1: Go to Integrations and set up the "Custom" integration.

You'll save your site url, and then grab your API key. Save that API key for later. This is your kno_id in the script.

Step 2: Grab your embed script snippet from Settings -> Survey Settings -> Miscellaneous.

The snippet will look something like this:

<script src="https://www.knocdn.com/v1/embed.js?id=xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"></script>

Step 3: Create your javascript object. The minimal version will look like this (although you can pass more information to enhance your Kno experience--see example HTML at the end of the doc for a complete list):

<script>
window.Kno = {
kno_id: 'XXXX-XXXX-XXXX-XXXX', // this is the API key found in the "custom" integration on the integrations tab.
customer: {
platform: 'CUSTOM',
shop: 'yoursite.com',
email: 'example@example.com',
id: 'id-from-some-platform',
},
order: {
id: '1234567890', //
total_price: 1000,
currency: '',
},
survey : {
selector: 'div#example-div' // required. Any element
}
};
</script>

Combine the two, and place on your order confirmation screen.

<!-- Start KnoCommerce Script -->
<script>
window.Kno = {
kno_id: 'XXXX-XXXX-XXXX-XXXX', // this is the API key found in the "custom" integration on the integrations tab.
customer: {
platform: 'CUSTOM',
shop: 'yoursite.com',
email: 'example@example.com',
id: 'id-from-some-platform' // Must be unique to customer,
},
order: {
id: '1234567890', //
total_price: 1000,
currency: '',
customer_journey: {
last_visit: {},
first_visit: {
source: "direct",
utm_parameters: {
term: "Identify the paid keywords",
medium: "Marketing medium (e.g. cpc, banner, email)",
source: "The referrer (e.g. google, newsletter)",
content: "Use to differentiate ads",
campaign: "Product, promo code, or slogan (e.g. spring_sale)"
}
},
days_to_conversion: 1,
customer_order_index: 1
},
},
survey : {
selector: 'div#example-div' // required. Any element
}};
</script>

<script src="https://www.knocdn.com/v1/embed.js?id=xxxx-xxxx-xxxx-xxxx"></script><!-- End KnoCommerce Script -->

You can download an example file here. Replace the following with your data:

  • line 11 - replace kno_id. This is your API key from step 1.

  • line 17 - this id must be unique to the customer

  • line 28 - replace selector. This is whatever element you want to attach to. Leave as-is for testing this HTML page.

  • line 99 - replace with your script from step 2.

  • For testing, you can leave all other fields alone, but each field in lines 13-28 should be replaced with your own order data variables to dynamically register order data.

A list of all possible parameters is in the file for reference but has been commented out.

Did this answer your question?