How do I install Google Trusted Store code / seal?



If you provide customers with reliable shipping, excellent customer service and turn over a high volume of orders, you may be eligible for a Google Trusted Store badge on your website.

Customers that click on the badge will see an expanded badge with additional details about the Google Trusted Stores program.

Before you begin, you must be registered as a Google Merchant and you must follow the strict eligibility requirements before you can apply.

To add the Google Trusted Store code to your site:

  1. Go to Setup & Tools > All settings & tools > Third Party Scripts.
  2. Click on the Analytics & 3rd Party Scripts tab.
  3. Click Custom Scripts link.
  4. Click on the Add New button to add a new script
  5. Enter a name for your script (eg: Google Trusted Store Code) and enter the following code into the Page Footer section:
  6. <!-- BEGIN: Google Trusted Stores -->
    <script type="text/javascript">
      var gts = gts || [];
      gts.push(["id", "[@REFERRAL_KEY1@]"]);
      gts.push(["badge_position", "BOTTOM_RIGHT"]);
      gts.push(["locale", "en_AU"]);
      gts.push(["google_base_country", "au"]);
      gts.push(["google_base_language", "en"]);
      (function() {
        var scheme = (("https:" == document.location.protocol) ? "https://" : "http://");
        var gts = document.createElement("script");
        gts.type = "text/javascript";
        gts.async = true;
        gts.src = scheme + "www.googlecommerce.com/trustedstores/api/js";
        var s = document.getElementsByTagName("script")[0];
        s.parentNode.insertBefore(gts, s);
      })();
    </script>
    <!-- END: Google Trusted Stores -->
  7. Enter the following code into the Purchase Confirmation (Thank You Page) section:
  8. [%site_value id:'footer_javascript'%]
    <!-- BEGIN: Google Trusted Stores -->
    <script type="text/javascript">
      var gts = gts || [];
      gts.push(["id", "[@REFERRAL_KEY1@]"]);
      gts.push(["badge_position", "BOTTOM_RIGHT"]);
      gts.push(["locale", "en_AU"]);
      gts.push(["google_base_country", "au"]);
      gts.push(["google_base_language", "en"]);
      (function() {
        var scheme = (("https:" == document.location.protocol) ? "https://" : "http://");
        var gts = document.createElement("script");
        gts.type = "text/javascript";
        gts.async = true;
        gts.src = scheme + "www.googlecommerce.com/trustedstores/api/js";
        var s = document.getElementsByTagName("script")[0];
        s.parentNode.insertBefore(gts, s);
      })();
    </script>
    <!-- END: Google Trusted Stores -->
    [%/site_value%]
    
    <!-- Set Todays Day - Used For Ship Date and Delivery Date Calculation Below -->
    [%SET [@data:todays_day@]%][%FORMAT type:'date' format:'#W'%]today[%/FORMAT%][%/SET%]
    
    <!-- START Google Trusted Stores Order -->
    <div id="gts-order" style="display:none;" translate="no">
    <span id="gts-o-est-ship-date"><!--##[%IF [@data:todays_day@] eq 'Friday'%][%FORMAT type:'date' format:'#Y-#M-#D'%]today 3 days time[%/FORMAT%][%ELSEIF [@data:todays_day@] eq 'Saturday'%][%FORMAT type:'date' format:'#Y-#M-#D'%]today 2 days time[%/FORMAT%][%ELSE%][%FORMAT type:'date' format:'#Y-#M-#D'%]today 1 days time[%/FORMAT%][%/IF%]##--></span>
    <span id="gts-o-est-delivery-date"><!--##[%IF [@data:todays_day@] eq 'Friday'%][%FORMAT type:'date' format:'#Y-#M-#D'%]today 10 days time[%/FORMAT%][%ELSEIF [@data:todays_day@] eq 'Saturday'%][%FORMAT type:'date' format:'#Y-#M-#D'%]today 9 days time[%/FORMAT%][%ELSE%][%FORMAT type:'date' format:'#Y-#M-#D'%]today 7 days time[%/FORMAT%][%/IF%]##--></span>
    [%SHOW_ORDER id:'[@ORDER_ID@]'%]
    [%PARAM *header%]
     <span id="gts-o-id">[@order_id@]</span>
      <span id="gts-o-domain">[@REFERRAL_KEY2@]</span>
      <span id="gts-o-email">[@email@]</span>
      <span id="gts-o-country">[@ship_country@]</span>
      <span id="gts-o-currency">AUD</span>
      <span id="gts-o-total">[@grand_total@]</span>
      <span id="gts-o-discounts">[@discount_total@]</span>
      <span id="gts-o-shipping-total">[@shipping_price@]</span>
      <span id="gts-o-tax-total">[@tax_total@]</span>
      <span id="gts-o-has-preorder">N</span>
      <span id="gts-o-has-digital">N</span>
      <!-- end order and merchant information -->
    [%END PARAM%]
    [%PARAM *body%]
     <!-- start repeated item specific information -->
      <span class="gts-item">
        <span class="gts-i-name">[@MODEL@]</span>
        <span class="gts-i-price">[%format type:'number' dp:'2'%][@PRICE@][%END format%]</span>
        <span class="gts-i-quantity">[@QTY@]</span>
        <span class="gts-i-prodsearch-id">[@SKU@]</span>
        <span class="gts-i-prodsearch-store-id">[@REFERRAL_KEY3@]</span>
        <span class="gts-i-prodsearch-country">au</span>
        <span class="gts-i-prodsearch-language">en</span>
      </span>
      <!-- end repeated item specific information -->
    [%END PARAM%]
    [%PARAM *footer%]
    </div>
    <!-- END Google Trusted Stores Order -->
    [%END PARAM%]
    [%END SHOW_ORDER%]
    <!-- End Google -->
  9. Enter your Google trusted store id into Key 1 (eg: 123456) - you can get this from https://www.google.com/trustedstores
  10. Enter your website URL without http:// or https:// into Key 2 (eg: www.mydomain.com).
  11. Save the changes.
  12. Follow the instructions from within your Google Trusted stores account to test the integration.

Once the script is installed correctly, you will see the survey popup appear on the order confirmation page.

Once the code has been tested, it can take up to 30 days before the Google Trusted Stores badge will appear on your site.


  • Last Modified: 18/11/2016 Neto Version: 6.4