I am adding Google Trusted Stores badge to our site like the site below:
http://www.contractorsdirect.com/Bar...ayer-Hand-Cart
But I could not complete the last step: order confirmation code
I had the order confirmation code for Google Analytics . It works without problems. It collects transactions data and presented in Google Analytics dashboard.
But the Google Trusted stores order confirmation code does not work at all.
<!--Google Trusted Stores Order Confirmation Start-->
<div id="gts-order" style="display:none;" translate="no">
<span id="gts-o-id"><%=getCurrentAttribute('confirmation','ordernu mber')%></span>
<span id="gts-o-email"><%=getCurrentAttribute('customer','email')% ></span>
<span id="gts-o-country">US</span>
<span id="gts-o-currency">USD</span>
<span id="gts-o-total"><%=getCurrentAttribute('confirmation','subt otal')%></span>
<span id="gts-o-discounts">0</span>
<span id="gts-o-shipping-total"><%=getCurrentAttribute('confirmation','ship ping')%></span>
<span id="gts-o-tax-total"><%=getCurrentAttribute('confirmation','tax' )%></span>
<span id="gts-o-est-ship-date">5 days</span>
<span id="gts-o-est-delivery-date">5 days</span>
<span id="gts-o-has-preorder">Y</span>
<span id="gts-o-has-digital">N</span>
<script type="text/javascript">
var gtsitems = {};
var itemsInOrder = "<%=getCurrentAttribute('confirmation','orderitems ')%>";
var lineItems = itemsInOrder.split("||");
var orderItem;
for (var in lineItems) {
itemAttributes = lineItems[item].split("|");
orderItem = {
'sku': itemAttributes[0],
'name': itemAttributes[1],
'category': itemAttributes[2],
'price': itemAttributes[3],
'quantity': itemAttributes[4]
};
gtsitems.push(orderItem);
}
</script>
<span class="gts-item">
<span class="gts-i-name">name</span>
<span class="gts-i-price">price</span>
<span class="gts-i-quantity">quantity</span>
<span class="gts-i-prodsearch-id">sku</span>
<span class="gts-i-prodsearch-store-id">NSID</span>
</span>
</div>
<!--Google Trusted Stores Order Confirmation End-->