{% if cart_is_fullpage or context == "checkout" or context == "receipt" %}
{% if first_receipt_display %}
The above code handles adding the tracking code to the full page cart, checkout and receipt templates, as well as the order information on the receipt page. The order information is only added on the first display of the receipt to prevent any false positives or duplication.
===== Customise the code =====
Within the code you pasted, you'll need to edit a few values:
==== Account ID ====
Look for the following line and update ''GTS_ACCOUNT_ID'' with your account ID
{% endif %}
{% endif %}
gts.push(["id", "GTS_ACCOUNT_ID"]);
==== Google Shopping Information ====
If you submit feeds to Google Shopping, there are two blocks you can edit. Within the first script block, look for the following code and uncomment by removing the ''%%//%%'' from any of the four lines as required:
//gts.push(["google_base_offer_id", "ITEM_GOOGLE_SHOPPING_ID"]);
//gts.push(["google_base_subaccount_id", "ITEM_GOOGLE_SHOPPING_ACCOUNT_ID"]);
//gts.push(["google_base_country", "ITEM_GOOGLE_SHOPPING_COUNTRY"]);
//gts.push(["google_base_language", "ITEM_GOOGLE_SHOPPING_LANGUAGE"]);
Within the second script block, you may also want to include some relevant information for each product. Uncomment the four lines by removing the '''' at the end towards the bottom of the second script block that looks like this and update the placeholders in capitals, removing any lines you don't need:
==== Store Domain ====
GTS wants to know your store domain where the customer added the products to the cart, in the format ''www.example.com'', update the following line with your domain:
www.YOURDOMAIN.com
==== Currency ====
If you're in a currency other than USD, update the ''USD'' value within the second script block for the order information on this line:
USD
==== Delivery Dates ====
You may also need to edit the shipping and delivery dates (defaulted to 1 day and 3 days from today respectively). Look for this code in the order information and change the days added as required:
{{ "now"|date_modify("+1 days")|date("Y-m-d") }}
{{ "now"|date_modify("+3 days")|date("Y-m-d") }}
==== Preorder/Digital Products ====
If there are preorder or digital products present in the order, look for the following two lines and update as required to say ''Y'' instead of ''N'':
N
N
===== Validate your javascript =====
Follow the steps on GTS documentation for [[https://support.google.com/trustedstoresmerchant/answer/6063088?hl=en-AU|Validating your javascript implementation]]. Note that the Google Trusted Stores badge doesn't appear until your account is activated by Google.