Integracja Opinii konsumenckich Google

Aby korzystać z Opinii konsumenckich Google, umieść poniższy kod w sekcji Additional scripts. Nie zapomnij dostosować merchant_id oraz estimated_delivery_date.

<!-- Google Customer Reviews - Start -->
<script>
if (PolishPayments.firstTimeAccessed) {
  var gcr = document.createElement("script")
  gcr.src = "https://apis.google.com/js/platform.js?onload=renderOptIn"
  document.body.parentNode.appendChild(gcr)


  var deliveryCountry =
    Shopify.checkout.shipping_address &&
    Shopify.checkout.shipping_address.country_code
      ? Shopify.checkout.shipping_address.country_code
      : Shopify.checkout.billing_address.country_code


  window.renderOptIn = function() {
    window.gapi.load("surveyoptin", function() {
      window.gapi.surveyoptin.render({
        merchant_id: 000000,
        order_id: "{{ order.name }}",
        email: ((Shopify || {}).checkout || {}).email,
        delivery_country: deliveryCountry,
        estimated_delivery_date:
          "{{ checkout.created_at | date:'%s' | plus:604800 | date:'%F' }}",
      })
    })
  }
  window.___gcfg = {
    lang: "pl",
  }
} 
</script>
<!-- Google Customer Reviews - End -->
Czy to odpowiada na Twoje pytanie? Dziękujemy za opinię There was a problem submitting your feedback. Please try again later.