Created
June 12, 2019 11:20
-
-
Save pavr0m/c2b7943249a458e511265f1c32f820d3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% comment %} | |
Example of AdWords Purchase conversion tracking code. | |
Make sure you've already got global AdWords tag installed on the site. | |
{% endcomment %} | |
{% if first_time_accessed %} | |
<!-- Event snippet for Purchase CH conversion page --> | |
<script> | |
gtag('event', 'conversion', { | |
'send_to': 'XXX', // Paste here a static value you've got while creating the conversion event in AdWords account | |
'value': '{{ total_price | money_without_currency | remove: "," }}', | |
'currency': '{{ shop.currency }}', | |
'transaction_id': '{{ order.order_number }}' | |
}); | |
</script> | |
{% endif %} | |
{% comment %} | |
Put it on the page that is displayed to the customer | |
immediately after the order has been accepted by the system | |
{% endcomment %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment