How to Add Affiliate Product Boxes to Ghost, Squarespace, Webflow or Any Website

Not on WordPress? Add Amazon and other affiliate product boxes to Ghost, Squarespace, Webflow or plain HTML with one line of code.

Updated • By the AffiliateBoxes team

Short answer

Build the product box in AffiliateBoxes, add your website to your account, then copy the box's one-line script tag into your site's HTML or code block. It works on Ghost, Squarespace, Webflow, plain HTML and any platform that lets you add custom code — no WordPress needed.

Why most affiliate box plugins don't work here

Popular Amazon affiliate tools like AAWP and AmaLinks Pro are WordPress plugins: they only run inside WordPress. If your blog runs on Ghost, your store on Squarespace or your landing pages on Webflow, you're left pasting plain text links or building boxes by hand.

AffiliateBoxes works differently. Your products and boxes live in your AffiliateBoxes dashboard, and each box has a small script that displays it on any page. The box renders in a Shadow DOM, so it looks the same on every platform and your site's CSS can't break it.

Step 1: Create the box in AffiliateBoxes

  1. Create a free account — no credit card needed.
  2. Add your website under Sites, using the exact address your visitors use (for example https://www.example.com if your site uses www). Boxes only display on sites you've added, so this step matters.
  3. Import your product with the browser extension from Amazon, Walmart, Etsy or any other retailer — see how the import works.
  4. Style it in the visual editor: colours, buttons, ribbons, pros and cons.
  5. Copy the script tag shown under Insert into any website on the product page. It looks like this:
    <script src="https://affiliateboxes.com/box/…js"></script>

Step 2: Paste it into your platform

Ghost

In the post editor, click + and choose the HTML card. Paste the script tag and publish. The box appears when you view the published post.

Squarespace

Edit the page, add a Code block where you want the box, paste the script tag and save. Squarespace only runs JavaScript in Code blocks on plans that allow custom code, so check your plan if the box doesn't show.

Webflow

Drag a Code Embed element onto the page, paste the script tag, save and publish. Custom code runs on the published site, so preview the live page rather than the Designer.

Plain HTML and static sites

Paste the script tag into your HTML exactly where the box should appear. This also works for static site generators such as Hugo, Jekyll, Eleventy and Astro — add it to the Markdown or template where raw HTML is allowed.

Other platforms

Any platform that lets you insert custom HTML with a <script> tag directly on the page will work. Look for an option called "HTML", "Code", "Embed" or "Custom code".

Comparison tables work the same way

Every comparison table has its own script tag too. Build the table from your products and paste its script wherever you want the table to appear.

Troubleshooting

  • "Box not allowed on this site" — add the site to your AffiliateBoxes account with the exact address shown in the browser, including or excluding www.
  • Nothing appears — make sure your platform runs scripts in that block (some only do on paid plans or on the published page, not in the editor preview).
  • Old version showing — clear your site's or CDN's cache; the script itself always loads the latest box.

Frequently asked questions

Yes. AffiliateBoxes gives every product box and comparison table a one-line script tag that works on any website that lets you add custom HTML — Ghost, Squarespace, Webflow, static HTML sites and more.

No. Boxes render inside a Shadow DOM, which isolates them from your site's CSS: your theme can't break the box, and the box can't change your theme. You style the box in the AffiliateBoxes visual editor instead.

Boxes only display on websites you have added to your AffiliateBoxes account. Add the site with the exact address visitors use — including www if your site uses it — and assign the box to that site.

No. The script loads the current version of the box every time, so changes you make in AffiliateBoxes appear on your site automatically.

Build your first product box free

Amazon and every other network, WordPress or any website. No credit card, no Amazon API key.