New

50% off Shop Products & 50% off 1st Month of Retainer Packages. Terms apply*. Contact us to apply your discount.

How to install Google Merchant Center store badge in Shopify

Last updated:

Home » Articles » Shopify » How to install Google Merchant Center store badge in Shopify

The Google Merchant Center Store Badge (also called the “Top Quality Store Badge”) is a small icon that shows customers your store meets Google’s high standards. This guide shows you how to check if you qualify, get the badge, and add it to your Shopify store.

How to add the Google Merchant Center store badge to Shopify

Step 1: Check if your store qualifies

Before you can install the badge, you need to make sure your store qualifies.

How to check:

  1. Log in to Google Merchant Center
  2. Click on “Store Quality” (you’ll find this under “Your business” in the left menu)
  3. Look for the option that says “Show the badge on your website”
  4. If you see this option, you qualify for the badge
  5. Check your overall score – you need an “Exceptional” rating to get the badge

What Google looks at:

Google checks your store in several areas. You don’t need perfect scores everywhere, but you need to do well overall in at least 3 areas:

  • Shipping: Deliver orders within 0-3 days and keep shipping costs low
  • Customer reviews: You need an average rating between 4.9 and 5 stars
  • Website speed: Your pages should load in under 2 seconds on both desktop and mobile
  • Image quality: At least 87% of your product images should be high quality (1024 pixels or larger)

Step 2: Get the official badge code

Important: Always get the badge code directly from your Google Merchant Center account. Don’t copy code from other websites because Google sometimes updates it. You can also find the official instructions and code at Google’s official documentation.

The current official code looks like this:

<!-- BEGIN MerchantWidget Code -->
<script id='merchantWidgetScript'
src="https://www.gstatic.com/shopping/merchant/merchantwidget.js"
defer>
</script>
<script type="text/javascript">
merchantWidgetScript.addEventListener('load', function () {
merchantwidget.start({
position: 'RIGHT_BOTTOM'
});
});
</script>
<!-- END MerchantWidget Code -->

You can change where the badge appears:

  • Change ‘RIGHT_BOTTOM’ to ‘LEFT_BOTTOM’ if you want it on the left side
  • Add margin settings to control exact positioning

Example with custom positioning:

<script type="text/javascript">
merchantWidgetScript.addEventListener('load', function () {
merchantwidget.start({
position: 'LEFT_BOTTOM',
sideMargin: 21,
bottomMargin: 33,
mobileSideMargin: 11,
mobileBottomMargin: 19
});
});
</script>

Step 3: Install the badge code

Method 1: Add code to theme.liquid

This works for most Shopify stores:

  1. Go to your Shopify Admin
  2. Click Online Store, then Themes
  3. Click the three dots next to your theme and select “Edit Code”
  4. Open the file called theme.liquid (it’s in the Layout folder)
  5. Make sure the file starts with <!DOCTYPE html>
  6. Find the <head> section
  7. Paste the badge code just before </head>
  8. Click Save

Method 2: Add code to header section

Some stores need to use this method instead:

  1. Go to sections/header.liquid in your code editor
  2. Place the code right above </header>
  3. Save the file

Method 3: Create a snippet (keeps code organised)

This method keeps your main files cleaner:

  1. In the Shopify code editor, go to the Snippets folder
  2. Click “Add a new snippet” and name it gmc-badge
  3. Paste the badge code into this new snippet and save it
  4. Go back to theme.liquid
  5. Add {% render 'gmc-badge' %} in the <head> section
  6. Save the file

Method 4: Custom app block (for advanced users)

If you’re using a newer Shopify theme:

  1. Create a new section in your theme
  2. Add the badge code to this section
  3. Set it up as an app block
  4. Add the block to your pages through the theme customizer

Step 5: Test your installation

Before making your site live, test the badge:

  1. Open your website in Google Chrome
  2. Right-click and select “Inspect” to open Developer Tools
  3. Click on the “Console” tab
  4. Copy and paste this code, then press Enter:
var script = document.createElement('script');
script.type = 'text/javascript';
script.src = 'https://www.gstatic.com/shopping/merchant/merchantwidget.js'; 
document.head.appendChild(script);
  1. Then copy and paste this code and press Enter:
merchantwidget.start({});

What happens after you install

How the badge works:

The badge shows up as “Top Quality Store on Google” for about 2 seconds, then just the icon stays visible. When customers click it, they see a popup explaining what the badge means and showing your store’s ratings.

Timeline for activation:

  1. Right away: Code is installed but badge might not show yet
  2. 1-2 days: Some stores see the badge appear after a short delay
  3. Up to 30 days: Full activation can take up to a month

Keeping your badge:

Google updates the requirements regularly. You might lose the badge if your performance drops, and it will come back if you improve. Check your Store Quality scores regularly to keep your badge.

Summary

The Google Merchant Center Store Badge is a great way to show customers they can trust your store. It helps attract more customers, builds trust, and can help your products rank higher in Google Shopping.

Installing the badge can be tricky because it’s still being tested by Google, but following this guide with the correct code should work. Remember that getting the badge means you need to keep providing excellent customer service and maintain high quality standards.

The most important thing: Focus first on getting an “Exceptional” Store Quality rating in Google Merchant Center, then use the official badge code and installation methods shown above.

Become an expert website owner

Join our community of website professionals and learn how to achieve website success through our helpful newsletter.