• Introduction

    • Overview
    • What to ask
  • Guide

    • Quick Start
    • Getting Started

      • Installation
      • Creating Your First Survey
      • Publishing Your Survey
    • Integrations

      • Overview
      • Klaviyo
      • Slack
      • Segment
      • Shopify Flow

Publishing Your Survey

There are a few ways to publish your survey to your customers. You can embed the survey on your store if you are on Shopify, or share the survey link directly with your customers. You can also embed the survey anywhere on your website or app by using the provided embed code.

Share the Survey Link

You can share the survey link directly with your users. To get the survey link, go to the Distribution page of your survey and copy the Standalone Survey URL. You can share this link on your website, social media, email campaigns or chat apps like WhatsApp and iMessage.

Standalone Survey URL
Standalone Survey URL

Embed on Shopify (Checkout Extension)

Scope provides a Shopify app that allows you to easily embed your survey on your Thank You and Order Status pages. Before you start, please copy the Survey ID from the survey you want to embed which can be found on the Distribution page.

  1. Make sure you have already installed the Scope Shopify app on your Shopify store.
  2. Go to the Online Store > Themes section in your Shopify admin dashboard.
  3. On the currently active theme, click on the Customize button.
  4. In the theme editor, locate the Pages dropdown menu and select Checkout and customer accounts.
  5. Once the page is loaded, click on the Checkout dropwn menu and select Thank you.
  6. On the left side of the screen, click on the Sections tab.
  7. Click on the Add app block button on either the Order Details or Order Summary section and select Scope in the list of available apps.
  8. Paste the Survey ID in the Survey ID field and click Save.

Repeat the same steps for the Order Status page to embed the survey on the Order Status page.

Tips

We recommend choosing the Order Details section to display the survey. This will ensure that the survey is displayed above other content and is more visible to the customer.

Embed on Website or App

You can embed the survey on any website or app by adding the following code within the <head> of your HTML page.

<script>
  (function (window, document) {
    'use strict';

    window.scopeConfig = {
      apiKey: '<PUBLIC_API_KEY>',
      surveyId: '<SURVEY_ID>',
    };

    const script = document.createElement('script');
    script.src = 'https://scpe.io/embed.js';
    script.fetchPriority = 'high';
    document.head.appendChild(script);
  })(window, document);
</script>

Within the <body> of your HTML page:

<div data-scope></div>

By default, the survey will look for a container with data-scope attribute and append the survey to it. You can override this behavior by passing the target key in the window.scopeConfig object.

You can find your Public API Key from your Settings > API Keys page.

Public API Key
Public API Key

Extending your survey

The window.scopeConfig object allows you to pass additional information to the survey. The following values are supported:

KeyTypeDescriptionExample
targetstringThe HTML element that the survey will be appended to.'#survey-container'
platformstringThe platform where your order data resides. If the platform is set to shopify, we will automatically fetch the Order & Customer details from Shopify based on the supplied orderID.'shopify'
channelstringThe channel where the survey is embedded.'web'
externalIdstringThe unique identifier of the user.'12345'
companystringThe company name of the user.'Scope'
emailstringThe email address of the user.'demo@example.com'
phonestringThe phone number of the user.'+1234567890'
firstNamestringThe first name of the user.'John'
lastNamestringThe last name of the user.'Doe
genderstringGender of the user'Female'
dobstringDate of birth of the user'1990-01-01'
citystringCity'New York'
statestringState'NY'
postcodestringPostcode'10001'
countrystringCountry'United States'
countryCodestring2-letter country code'US'
orderIdstringOrder ID'123456789'
orderTotalfloatTotal amount of the order100.00
discountTotalfloatTotal discount applied to the order10.00
discountCodestringDiscount code applied to the order'SAVE10'
productIdsarrayArray of product IDs in the order[12345, 67890]
orderCurrencystringCurrency of the order'USD'
Prev
Creating Your First Survey