WebAcappella
Menu
Language

Conversion Tracking and Google Customer Reviews

The store settings allow you to insert a tracking script on the order confirmation page: Google Customer Reviews, a Google Ads conversion, a Meta pixel, or any other tracking tool. This is the only place on your site where an external tool can receive details about an order that has actually been confirmed.

Where to find the setting

  1. Open the store settings.
  2. Select the “Conversion Tracking” section.
  3. Check the box next to “Enable the tracking script on the order confirmation page.”
  4. Click “Edit Tracking Script” and paste your code.
  5. Publish the site: the script is sent to your server upon publication.

Available placeholders

Before insertion, WebAcappella automatically replaces the following placeholders with the actual order data. They are enclosed in double curly braces, and it’s up to you to add quotation marks around them if your script requires them.

Placeholder Content
{{ORDER_ID}} Order ID
{{ORDER_EMAIL}} Customer email address
{{ORDER_COUNTRY}} Delivery country code, in ISO format (FR, BE, CH...)
{{ORDER_DELIVERY_DATE}} Estimated delivery date, in YYYY-MM-DD format
{{ORDER_DATE}} Order date, in YYYY-MM-DD format
{{ORDER_AMOUNT}} Total order amount, including shipping
{{ORDER_AMOUNT_SHIPPING}} Shipping cost only
{{ORDER_AMOUNT_NO_SHIPPING}} Total amount excluding shipping
{{ORDER_CURRENCY}} Currency code (EUR, CHF...)

Use Case: Google Customer Reviews

Google Customer Reviews offers customers the option, immediately after placing an order, to receive an invitation later to rate their purchase. The ratings collected contribute to your reputation as a seller on Google.

Three conditions must be met on Google’s end before anything can be displayed:

The “Example for Google Customer Reviews” button in this section inserts the code below, which is already populated with the correct placeholders. All you need to do is replace YOUR_MERCHANT_ID with your merchant ID:

<script src="https://apis.google.com/js/platform.js?onload=renderOptIn" async defer></script>
<script>
window.renderOptIn = function() {
  window.gapi.load('surveyoptin', function() {
    window.gapi.surveyoptin.render({
      "merchant_id": YOUR_MERCHANT_ID,
      "order_id": "{{ORDER_ID}}",
      "email": "{{ORDER_EMAIL}}",
      "delivery_country": "{{ORDER_COUNTRY}}",
      "estimated_delivery_date": "{{ORDER_DELIVERY_DATE}}"
    });
  });
};
</script>

Estimated Delivery Date

Google Customer Reviews needs an estimated delivery date to send its invitation at the right time. This date comes from a setting available in each shipping method: “Estimated delivery time (days).” This timeframe is added to the order date to generate the {{ORDER_DELIVERY_DATE}} tag.

If the timeframe is not specified, the placeholder returns the order date itself. The script remains functional, but the invitation will be sent too early.

Test Without Paying

A deferred payment method allows you to place a test order on your own store without any money changing hands, and to reach the actual confirmation page.

  1. Temporarily enable a deferred payment method: bank transfer, check, or cash on delivery.
  2. Publish the site.
  3. Place an order on your own store by selecting this payment method.
  4. The confirmation page that appears will contain your script.
  5. Delete the test order from the order management section once verification is complete.

To verify a correction without having to place a new order each time, the “Conversion Tracking” section offers the option “Replay the script each time the order confirmation page is displayed.” Enable this option, publish the site, then reload the confirmation page for your test order as many times as necessary.

The script doesn’t seem to be doing anything

The symptom is the same regardless of the cause: the confirmation page displays normally, with nothing else happening. Go through the following steps in order.

  1. The site has been republished since the script was last modified. Until the site is republished, your server will continue to use the old version.
  2. The “Enable tracking script on the order confirmation page” checkbox is selected.
  3. The order you’re looking at hasn’t already triggered the script during a previous session. The verification option described above disables this restriction during debugging.
  4. No ad blockers are active in the browser used for testing. Most block apis.google.com, which is enough to prevent the prompt from appearing.
  5. The browser console (F12 key) does not report any errors in your script. A missing quotation mark or comma will break the entire block.
  6. For Google Customer Reviews: Your enrollment in the program is confirmed in Merchant Center, and the merchant ID matches the registered account.
  7. For Google Customer Reviews: The order’s shipping country is covered by the program. Google does not display the invitation in all countries.

Other Uses

This section isn’t limited to Google Customer Reviews. Any tracking code that relies on the details of a confirmed sale can be used here: Google Ads conversions, Meta pixels, and affiliate tracking. The {{ORDER_AMOUNT}}, {{ORDER_CURRENCY}}, and {{ORDER_ID}} placeholders then send the order amount and ID to your tool.

Google Customer Reviews sends your customer’s email address to Google in order to send them the invitation. Mention this data transfer in your privacy policy and ensure it remains consistent with the consent you collect, especially if your customer base is located in a country with a strict interpretation of the GDPR.