Skip to main content
All CollectionsGetting StartedAccount SetupCustom Setup
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 this week

Available on paid plans.

KnoCommerce is fully platform agnostic. We currently work natively with Shopify, and support all other platforms using this Universal Embed/Custom Integration. Official integrations will be coming with WooCommerce, BigCommerce, Magento, and others.



Specific Use Cases of Universal Embed

All non-Shopify platforms use the technology and format described in this help doc. However, we have given more advanced instructions for some specific setups:

If you're looking for a particular solution on a particular platform, let us know about it by emailing KnoCommerce! We're always looking for recommendations, and if we have enough requests, we'll build it!

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. πŸ‘‡


Start by Configuring KnoCommerce

Set up Custom integration

Step 1: The first step in KnoCommerce is to log in to your account, go to the Integrations page, and click 'Connect' for the Custom integration.

Step 2: Next, you'll need to enter the store URL (the main page for your brand works best i.e. www.mybrandname.com) and click Save.

Step 3: Once you save the Custom Integration, we will create an API Key that is associated with your account. It will live on the Custom Integration page, and have the format of XXXXXXX-XXXXXXX-XXXXXXX-XXXXXXX (format is a mixture of letters and numbers). Save this API Key for later; it will be called kno_id in your custom script setup -> kno_id = API Key.


Find the Embed Script Snippet

Step 4: After you configure your custom integration and grab your API Key, you'll need to grab the embed script snippet from the KnoCommerce UI. Go to Settings->Survey Settings and click the Miscellaneous tab. Then copy the Embed Script snippet and save it for later.

The snippet will look something like this:

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

Configure Brand Confirmation Page Code

Minimum Script

Step 5: Copy and paste the following minimum window.Kno Javascript object into the code on the confirmation page.

This is the information that is REQUIRED to be passed from the brand to KnoCommerce so that our technology works correctly. We only recommend this be used for testing in staging environments as there is more important information that is not required but is very important for the functionality of certain features.

<script>
window.Kno = {
kno_id: 'XXXX-XXXX-XXXX-XXXX',
customer: {
platform: 'CUSTOM',
shop: 'yoursite.com',
email: 'example@example.com',
phone: '1234567890'
},
order: {
id: '1234567890',
total_price: '0',
},
survey : {
selector: 'div#example-div'
}
};
</script>

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

Minimum Script Instructions

Step 6: Once you copy/paste the script into your store, you'll need to make some changes to it. Here are the changes you need to make:

  • kno_id -> replace 'XXXX-XXXX-XXXX-XXXX' with your API Key found in Step 3

  • customer.platform -> leave as 'CUSTOM' or change to the name of your brand's e-comm platform (i.e. 'Salesforce' or 'SFCC')

  • customer.shop -> replace with your brand's static URL

  • customer.email -> required (if no phone), replace with your platform's dynamic email variable

  • customer.phone -> required (if no email), replace with your platform's dynamic phone variable

  • order.id -> required (must be a string), replace with your platform order ID variable

  • order.total_price -> required. Must be number

  • survey.selector -> required. Must be an HTML element on the confirmation page. We will add our survey widget as a sibling that will immediately follow the selector.

  • script src -> required. replace the full line with the full line you saved in Step 4

Highly Recommended Script Additions

Step 7: Add the highly recommended attributes to the minimal script you already added to your confirmation page in Steps 5 & 6.

Note: These script additions are not required for the script to function correctly. You can collect survey responses without adding any additional attributes to the minimal script in Steps 5 & 6.

However, specific features within KnoCommerce depend on these attributes being present in the script OR most brands realize they want these attributes because of what it allows you to do with your data in KnoCommerce.

  • customer.lifetime_spent -> (number) replace with platform lifetime spend variable

    • required to have lifetime spend associated with survey responses in the CSV Export

  • customer.lifetime_orders -> (number) replace with platform lifetime order count variable (order count = 1 is customer's first order)

    • required for lifetime orders Audiences to show surveys to New Customers vs. Returning Customers

    • required to have lifetime order count associated with survey responses in the CSV Export

  • order.total_price -> (number) replace with platform order total variable

  • order.currency -> (string) default currency is USD. change the currency to see reports in your store's currency

  • order.customer_locale -> (string) formatted according to international country language standards

  • order.line_items -> The requirements for this are more complex so we've created a Custom Embed Line Items help doc to explain

    • required to utilize Product ID to create Audiences to filter data or send surveys to product purchasers

  • order.product_category -> The requirements for product category/collection are more complex so we've also create a Product Category/Collection help doc to explain further

    • required to utilize Product Category Title or Product Category ID Audiences for survey targeting or report filtering for specific product categories/collections


Full Script Variables

Between the minimal required script attributes and the highly recommended attributes, you and your brand should be set up quite nicely to collect survey responses and utilize Kno's best features. But if you're super nerdy πŸ€“ like us and want to squeeze just a little bit more out of the integration, this section is for you.

Check out the full custom integration example file by clicking the button below. All possible variables that can be passed to KnoCommerce are included (though most are commented out at the bottom of the file).

As always, if you need any clarification about anything in the file or this help doc, or you don't see something that you would like us to include, please let us know by emailing us at hello@knocommerce.com. We'd love to hear your questions and/or your feature requests!

Did this answer your question?