GotCashback Cashback Widget

Show your readers the best cashback rate or the best gift card discount for any store, refreshed several times a day, with a lightweight badge that links back to GotCashback. One script, no account or API key required.

GotCashback.co.uk compares cashback rates across 113 cashback portals in 42 countries worldwide, including 18 portals and 10,564 stores in the United Kingdom. Founded in 2020; operated by MNP Enterprises, LLC.

Build your embed code

Which portal's rate to show
Adds a line such as "Join Rakuten, get $30" when the portal shown offers a bonus to new members in this country.
Adds a small chart of the best rate over the last 90 days and whether it went up or down.
Partners earn referral credit for the clicks their badge sends. Find your code under Account → Referrals, or apply to become a partner. My referral code · Apply to become a partner

Preview

Pick a store to see the badge.

Your embed code

Script (recommended)
iframe (when you cannot add scripts)

What the widget shows

  • The rate badge shows the best cashback rate for the store across the cashback portals GotCashback compares, or the rate at the portals you pick, with the portal's icon and a tracked link to that portal.
  • The gift card badge shows the best discount currently available on the store's gift cards and links to the deal.
  • The sellers list shows every seller of the store's gift cards with its best discount, best first, each linking to the seller.
  • The trend adds a small chart of the best rate over the last 90 days, so readers see whether now is a good time to buy.
  • Every badge carries a small "via GotCashback" link to the store's page, where visitors can compare every portal and gift card seller.
  • The badge speaks the language of the store's country, with prices in its currency.
  • If the store has no rate (or the portals you picked have none), the badge renders nothing at all, never an error message on your page. Whatever you place inside the badge element stays visible as a fallback.

How to add it to your site

  1. Paste the snippet where the badge should appear: in a post, a product review, a sidebar.
  2. The script loads once per page (about 8 KB, cached for an hour) and fills every badge on the page.
  3. Add as many badges as you like; each one names its own store.
<div class="gotcashback-widget" data-store="walmart" data-country="us">
  <a href="https://www.gotcashback.com/Stores/walmart/">Walmart cashback rates</a>
</div>
<script async src="https://cdn.gotcashback.com/assets/widget/v1/widget.min.js"></script>

Options

AttributeValuesDefaultWhat it does
data-storewalmartrequiredStore slug, exactly as in the store's GotCashback page address (/Stores/…/).
data-countryus, gb, de, …requiredCountry code of the store's GotCashback property, lowercase (the United Kingdom is gb).
data-store-id123noneNumeric store id, an alternative to store and country.
data-typerate, giftcard, giftcardsraterate shows the best cashback rate; giftcard the best gift card discount; giftcards the list of sellers.
data-portalrakutennoneShows one portal's rate only, by its slug.
data-portalsrakuten,topcashbacknoneComma-separated portal slugs: the best rate among them.
data-portal-typecash, travel, creditcard, pointsnoneThe best rate among portals of one type: cash, travel, creditcard or points.
data-fallbackbestnoneWith a portal selection: show the overall best rate instead of nothing when the selection has none.
data-instoretruenonePrefer the in-store rate; falls back to the online rate when there is none.
data-signupbonustruenoneAdd the portal's sign-up bonus line when it offers one.
data-historytruenoneAdd the 90-day rate trend.
data-max1–2010Sellers list only: how many sellers to show.
data-refABC123noneYour GotCashback referral code; tracked links are credited to you.
data-themeauto, light, darkautolight, dark, or auto (follows the visitor's system setting).
data-sizenormal, smallnormalnormal or small.
data-target_self, _blank_self_self opens links in the same tab; _blank opens a new tab.

Styling

The badge uses your page's font and isolates its own styles, so it never conflicts with your CSS. Override colours and sizing with CSS custom properties on the badge element or any ancestor:

PropertyWhat it doesLightDark
--gcb-bgBackground#fff#1f2328
--gcb-fgText#1f2328#e6edf3
--gcb-mutedSecondary text#6b7280#9aa4b2
--gcb-accentRate and links#3063a0#7fb3ff
--gcb-borderBorder#d0d7de#3d444d
--gcb-up / --gcb-downTrend up / down#1a7f37 / #cf222e#3fb950 / #ff7b72
--gcb-radiusCorner radius6px6px
--gcb-fontFont familyinheritinherit
--gcb-font-sizeFont size (normal / small)14px / 12px14px / 12px
--gcb-shadowShadownonenone

For deeper changes, target the badge, main, via, bonus, trend, title, list and row parts with ::part().

.gotcashback-widget { --gcb-accent: #c00; --gcb-radius: 999px; }
.gotcashback-widget::part(via) { display: none; } /* not allowed, see Terms */

Earn with your referral code

Add your referral code and every click through your badge is attributed to you under the GotCashback partner program. Sign in and copy the code from Account → Referrals.

<div class="gotcashback-widget" data-store="walmart" data-country="us" data-ref="ABC123"></div>

iframe alternative

Platforms that strip scripts can embed the badge as an iframe. It shows the same badge, rendered by GotCashback, with the same options in the address. Use the generator above to get the exact address.

<iframe src="https://api.gotcashback.com/v1/widget/frame/us/walmart?type=rate" width="320" height="64" style="border:0" loading="lazy" title="Walmart cashback via GotCashback"></iframe>

Single-page apps and dynamic content

The script scans the page once when it loads. If you add badges later, call the render function on the container; it returns a promise that resolves when they are filled. A ready callback, if you define one, is called once the script has loaded.

window.gotcashbackReady = function (gcb) { /* the script has loaded */ };
window.GotCashback.render(document.getElementById('reviews')).then(function () { /* filled */ });

Frequently asked questions

Is the widget free?

Yes, for any website. The only condition is that the "via GotCashback" link stays visible and unchanged.

How current are the rates?

GotCashback refreshes portal rates several times a day; the badge caches its data for a short time, so it is at most a few hours behind.

Will it slow my page down?

No. The script is about 8 KB, loads asynchronously and makes one small request per store.

Does it set cookies or track my visitors?

The script itself sets no cookies and sends nothing about your visitors. A click goes through GotCashback's tracked redirect, and a referral cookie is set only when you use your referral code.

Which countries and stores are supported?

Every store on any GotCashback country property. Pick the country in the generator to search its stores.

Can I show several stores on one page?

Yes. Include the script once and add one badge element per store.

What do visitors without JavaScript see?

Whatever you put inside the badge element (the generator adds a plain link to the store's GotCashback page), or nothing if you leave it empty. The iframe version needs no script.

Terms

GotCashback is a comparison service, not a cashback portal: rates are shown as the portals publish them, and cashback is paid by the portal you click through to. Please do not hide, alter or add nofollow to the "via GotCashback" link.

Prefer an AI assistant to a badge? Set up the GotCashback MCP Server