flyingL123
flyingL123

Reputation: 8096

Bigcommerce and Google Trusted Store integration

I'm wondering if anyone has had any experience implementing Google Trusted Stores for a Bigcommerce merchant. Bigcommerce offers to do this for you if you pay them, but I'm trying to do it myself.

On the Google Trusted Stores order confirmation module, they require certain information to be passed to them. As far as I know, some of this information is not available as variables on the Bigcommerce order confirmation page. Here are the docs for the order confirmation module.

As you can see, it requires data like customer email, customer country, whether or not an item in the order is on preorder. Is there any way to get this information from Bigcommerce? Do they output variables of the type %%GLOBAL_CUSTOMEREMAIL%% that can be used?

If not, then Bigcommerce must populate this information on the server when they handle the Google Trusted integration for you. That means you can not be a Google Trusted store using Bigcommerce unless you pay them to do the integration. I'm hoping that is not the case.

Does anyone have experience with this?

Upvotes: 0

Views: 929

Answers (1)

Mayura Wijewickrama
Mayura Wijewickrama

Reputation: 749

I have some experience in enabling the Google Trusted Stores code without having to subscribe to the Platinum Level (I'm on a Gold Level plan). I have successfully set up automated daily Shipping and Cancellation Feeds through ShipWorks. I believe I set up the "Badge" code correctly on the footer.html:

<!-- BEGIN: Google Trusted Stores -->
<script type="text/javascript">
    var gts = gts || [];

    gts.push(["id", "######"]);
    gts.push(["badge_position", "BOTTOM_RIGHT"]);
    gts.push(["locale", "en_AU"]);
    gts.push(["google_base_offer_id", "%%GLOBAL_ProductId%%"]);
    gts.push(["google_base_subaccount_id", "8669332"]);
    gts.push(["google_base_country", "AU"]);
    gts.push(["google_base_language", "en_AU"]);

    (function() {
    var gts = document.createElement("script");
    gts.type = "text/javascript";
    gts.async = true;
    gts.src = "https://www.googlecommerce.com/trustedstores/api/js";
    var s = document.getElementsByTagName("script")[0];
    s.parentNode.insertBefore(gts, s);
    })();
</script>
<!-- END: Google Trusted Stores -->

I have to put the Order Confirmation Module Code on the website. The issue is figuring out the Est. Ship Date and Est. Delivery Date and putting in a "loop" to get the requested data for each item in the order. I have placed the following code on the order.html page:

<!-- START Google Trusted Stores Order -->
    <div id="gts-order" style="display:none;" translate="no">

    <!-- start order and merchant information -->
    <span id="gts-o-id">%%GLOBAL_OrderId%%</span>
    <span id="gts-o-domain">www.****.com.au</span>
    <span id="gts-o-email">%%GLOBAL_CurrentCustomerEmail%%</span>
    <span id="gts-o-country">%%GLOBAL_ShipCountry%%</span>
    <span id="gts-o-currency">%%GLOBAL_CurrencyName%%</span>
    <span id="gts-o-total">%%GLOBAL_OrderTotal%%</span>
    <span id="gts-o-discounts">%%GLOBAL_CouponDiscount%%</span>
    <span id="gts-o-shipping-total">%%GLOBAL_ShippingPrice%%</span>
    <span id="gts-o-tax-total">%%GLOBAL_TaxCost%%</span>
     <span id="gts-o-est-ship-date">ORDER_EST_SHIP_DATE</span>
     <span id="gts-o-est-delivery-date">ORDER_EST_DELIVERY_DATE</span>
    <span id="gts-o-has-preorder">N</span>
    <span id="gts-o-has-digital">N</span>
    <!-- end order and merchant information -->

    <!-- start repeated item specific information -->
    <!-- item example: this area repeated for each item in the order -->
    <span class="gts-item">
        <span class="gts-i-name">%%GLOBAL_ProductName%%</span>
        <span class="gts-i-price">%%GLOBAL_ProductPrice%%</span>
        <span class="gts-i-quantity">%%GLOBAL_ProductQuantity%%</span>
        <span class="gts-i-prodsearch-id">%%GLOBAL_ProductId%%</span>
        <span class="gts-i-prodsearch-store-id">######</span>
        <span class="gts-i-prodsearch-country">AU</span>
        <span class="gts-i-prodsearch-language">en_AU</span>
    </span>
    <!-- end item 1 example -->
    <!-- end repeated item specific information -->

    </div>
    <!-- END Google Trusted Stores Order -->

Does anyone succeed on this?

Upvotes: 1

Related Questions