Publish Disco on your Store
Display the DiscoFeed post-purchase on your order confirmation page. This helps learn more about your shoppers to improve advertising performance and feature complimentary brands.
What is the DiscoFeed?
The DiscoFeed is an experience that all Disco Brands feature on their post-purchase, Thank you/Order Confirmation and Order Tracking pages. It's by this method that you will show up on other brands as an advertiser as well. This experience will dynamically determine the most relevant brands to show to shoppers based on what they've purchased.
If you utilize the Shopify ecommerce platform, please install our app here and you don't need to do anything else on this page.
Step 1: Integrating the DiscoFeed
The Disco WebSDK consists of a few lines of Javascript that allows the Disco experience to be easily embedded on your Thank you/Order Confirmation and Order Tracking pages. The default location for placement on the page is at the top to ensure the greatest visibility.
Disco will provide you with a Publisher ID that will be passed into the Javascript source path to ensure appropriate information is loaded.
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Meta tags -->
<!-- Part #1 - Load the Web SDK -->
<script
src="https://d1zcmvsklxjbur.cloudfront.net/static/disco-sdk.js"
type="text/javascript"
publisher_id="<<PUBLISHER_ID>>"
></script>
<!-- Other scripts and meta tags -->
</head>
</html>
Step 2: Mounting point for the Disco Feed
Use the following to specify exactly where on the page the DiscoFeed should load.
<body>
<!-- Your HTML content here -->
<div id="disco-widget"></div>
</body>
Step 3: Passing Order Data on Load
To ensure we're providing the most relevant recommendation to the Shopper, Disco also requests passing Order data on the load of Thank you/Confirmation Pages and Order Tracking pages.
<!-- Part #2 - As soon as the order data attributes are available, execute the below JavaScript to display a disco widget -->
window.discoLauncher.loadWidget({
email: String, // (required)
phone: String,
first_name: String, // (required)
last_name: String,
shipping: {
address_line_1: String,
address_line_2: String,
city: String,
state: String,
zip: String,
},
billing: {
address_line_1: String,
address_line_2: String,
city: String,
state: String,
zip: String,
},
confirmation_id: String,
purchases: [
{
product_id: String,
type: String,
name: String,
description: String,
variant: String,
quantity: String,
},
], // (required)
cost: String,
order_id: String, // (required)
page_type: string, // (required)
});
Field Descriptions
The page_type
field only accepts two values: "thank_you"
or "order_status"
. Any other value will result in an error.
Field Name | Type | Details | Example |
---|---|---|---|
String | Plain text as provided by the shopper. | monica@disconetwork.com | |
phone | String | The shopper's phone number | 4151234567 or +1 (415) 123-4567 |
first_name | String | The first name as provided by the shopper. | Monica |
last_name | String | The last name as provided by the shopper. | Stone |
shipping | Object | Shipping address details. | See below |
billing | Object | Billing address details. | See below |
confirmation_id | String | Unique confirmation identifier. | 12345ABC |
purchases | Array | List of purchased items. | See below |
cost | String | Total cost of the order. | 100.00 |
order_id | String | Unique order identifier. | 67890XYZ |
page_type | Enum | Type of page where widget is mounted. | "thank_you" or "order_status" |
Shipping and Billing Address Fields
Field Name | Type | Details | Example |
---|---|---|---|
address_line_1 | String | First line of the address. | 123 Main St |
address_line_2 | String | Second line of the address (if any). | Apt 4B |
city | String | City name. | San Francisco |
state | String | State or province. | CA |
zip | String | Postal or ZIP code. | 94105 |
Purchases Fields
Field Name | Type | Details | Example |
---|---|---|---|
product_id | String | Unique identifier for the product. | PROD123 |
type | String | Type or category of the product. | Electronics |
name | String | Name of the product. | Headphones |
description | String | Description of the product. | Noise-cancelling headphones |
variant | String | Variant of the product (e.g., color, size). | Black |
quantity | String | Quantity purchased. | 2 |