Skip to main content

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.

note

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

note

The page_type field only accepts two values: "thank_you" or "order_status". Any other value will result in an error.

Field NameTypeDetailsExample
emailStringPlain text as provided by the shopper.monica@disconetwork.com
phoneStringThe shopper's phone number4151234567 or +1 (415) 123-4567
first_nameStringThe first name as provided by the shopper.Monica
last_nameStringThe last name as provided by the shopper.Stone
shippingObjectShipping address details.See below
billingObjectBilling address details.See below
confirmation_idStringUnique confirmation identifier.12345ABC
purchasesArrayList of purchased items.See below
costStringTotal cost of the order.100.00
order_idStringUnique order identifier.67890XYZ
page_typeEnumType of page where widget is mounted."thank_you" or "order_status"

Shipping and Billing Address Fields

Field NameTypeDetailsExample
address_line_1StringFirst line of the address.123 Main St
address_line_2StringSecond line of the address (if any).Apt 4B
cityStringCity name.San Francisco
stateStringState or province.CA
zipStringPostal or ZIP code.94105

Purchases Fields

Field NameTypeDetailsExample
product_idStringUnique identifier for the product.PROD123
typeStringType or category of the product.Electronics
nameStringName of the product.Headphones
descriptionStringDescription of the product.Noise-cancelling headphones
variantStringVariant of the product (e.g., color, size).Black
quantityStringQuantity purchased.2