Overview
This article explains how to embed your DistruCommerce menu directly into your website. It allows you to showcase your live inventory, pricing, and featured products without requiring customers to leave your website.
Prerequisites:
At least one menu already created in DistruCommerce
Have access to your website's HTML (specifically the
<head>
section)Have access to edit permissions in your site builder (e.g., Squarespace, if applicable)
Table of Contents
Video
1. Accessing the Embed Option
Go to DistruCommerce > Seller > Your Menus:
Click the three dots next to the menu you'd like to embed.
Select Embed.
Copy the embed code shown in the modal window.
2. Adding the Script to Your Website
Open your site’s HTML editor.
Locate the
<head>
section of the HTML page where you'd like to show the menu.Paste the copied script directly under
<head>
.Save and refresh your site.
💡 Pro-Tip: Work with your web developer or site admin to make sure it’s added in the correct location. Embedding works best on standalone product or order pages.
3. Add the Embed Code in Squarespace
Log into your Squarespace account:
Go to Website > Pages.
Select an existing page or create a new one.
Click the ⚙️ (Settings) icon for the chosen page.
Go to the Advanced tab.
In the Page Header Code Injection box, paste the embed code you copied from Distru.
Click Save.
Alternate Code:
If the default embed method gives you any trouble, you can try using this alternate code snippet. This version hides the page wrapper to allow a cleaner embed experience, especially on platforms like Squarespace.
Use this structure:
<style>
#siteWrapper { display: none }
</style>
<!-- Then paste your embed script below -->
<script type="text/javascript" src="https://staging.distru.com/embed/menu/distru.js"></script>
<script type="text/javascript">
window.distru.initializeMenu({
baseUrl: 'https://staging.distru.com',
companyId: YOUR_COMPANY_ID,
menuId: YOUR_MENU_ID
});
</script>
4. FAQs
Can I embed more than one menu on different pages?
Yes! You can embed each menu on a unique page using the same process.
Will the menu automatically update when I change products or prices?
Yes! The menu always reflects real-time data from Distru.