Gumroad Widgets

Gumroad widgets allow your customers to purchase your products without leaving your website. Go to the widgets page while logged into your account, and you can create a Gumroad buy button or an embeddable product page that can be placed in your website simply by cutting and pasting some simple code.

These are not, at the moment, a solution for "shopping cart" functionality - the kind you'd find on Amazon or major retail websites. They are excellent solutions for one-off purchases though, and if you want to avoid sending customers away from your site.

Getting Started

While all sales made through the Gumroad payment system are subject to our strict security standards, it's a good idea to secure your site before using a Gumroad widget. The best way to do this is with an SSL certificate

To use Gumroad widgets, all you need is to be able to access and make changes to the HTML of your website, or know how to add a line of Javascript to your page. If you are using a website builder, such as Wordpress, Wix, Weebly, or Squarespace, please consult their support documentation to help you with this.

NOTE: If you have multiple scripts running on your page, such as Google Analytics or other javascript-based tools that track "click events," you may encounter issues with the Gumroad widgets. The best solution to solve issues between scripts and the Gumroad widgets is to remove the scripts from your page.

ALSO NOTE: If you are using a template to build your website, you may find that the header of your page is covering the overlay window. When this happens, the "z-index" of your website's header is too high. To fix this, make sure you can set the Z-index to 0 or 1. More on what that means here.

The Gumroad Overlay

The overlay window jumps right off of your page. You can use the button we provide you with on the widget page or build it into your site just by linking to your products. The overlay works for single purchases as well as multiple purchases

The buying experience of the multi-buy overlay is similar to buying on your profile page. A small "bundle" opens up in the top right corner of your page, allowing customers to buy multiple products at once.

To set up the Overlay using the Gumroad-styled buy button on your page, just log into Gumroad and go to the Widgets page.

In the dropdown menu, select the product that you want to create a button for, and edit the text on your button. All changes will go live as you type.

Click Auto-trigger the payment form to send customers directly to the payment form, bypassing the product's description. If you'd like to disable multiple purchases, click Allow single-product purchases only.

Now you're ready to copy and paste your widget code onto your site. 

First, an explanation of this code just in case this is your first time dealing with Javascript or HTML:

SCRIPT: The top line is Javascript. This script acts in the background of your page, waiting for any links to Gumroad to be clicked. When these links are clicked, the overlay box opens up so your customer can make their purchase.

BUTTON: This line of code represents the Gumroad button. Its code tells your website to display the Gumroad-styled button. The second half, "Buy my product," displays what your button will say. 

href="Link": This portion represents the actual product which will open when this button is clicked. To learn how to find your Gumroad products' URLs, so you can easily create buttons in the future, click here.

Reminder: If you want to use a custom buy button on your page, just follow these steps:

  1. Put the Overlay javascript into the HTML of your page (the same as the one we showed you above!). 
  2. Create a button icon on your page.
  3. Turn that icon into a link, and link to your Gumroad product's URL.

The Embed

When you use the Embed, your customers can continue exploring your webpage while the payment form is open. If they buy from you, they can access their product immediately and remain on your site.

On your Widgets page, click Embed and select your product from the dropdown menu to bring up your Widget previews. If your page does not have an SSL Certificate, check the Redirect to Gumroad box. This will allow you to embed your product in your webpage, but send customers to a new tab in order to purchase your product.

Click the green button to copy your code to your dashboard. Now paste it on your site's HTML, wherever you see fit to have the product.

For clarification, the top part of the code represents the Javascript that allows your product to be embedded. If your website builder does not allow for "foreign" javascript to be dropped into your page, the Embed process will not work.

The second line of code represents your embedded product. Specifically:


The XXXX above is your Product ID. You can find this when editing your product (go to your Products dashboard and click the product's name to edit it). It's the "suffix" of your product's URL, which are either randomized (by default) or customized (by you).

More resources

Team up to sell more with overlay

Gumroad affiliates - sell with pals

The 4 elements of a killer creative website

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us