...
For Google Ads conversion tracking, you can add your Google Ad Words conversion snippet to the Thank You page above the <title> tag, but after the Google tag. In that snippet, you can specify a “value” in the conversion snippet OR dynamically populate the “value” using information passed in the sessions' “orderData”. To correctly collect dynamic conversion data, you must parse orderData from sessionStorage using the correct naming conventions.
...
Code Block |
---|
<script> var orderDataTmp = JSON.parse(sessionStorage.getItem("orderData")); if(orderDataTmp) { var orderValue = orderDataTmp.totalAmount; var transactionId = orderDataTmp.orderId; gtag('event', 'conversion', { 'send_to': 'AW-XXXXXXXX/XXXXXXXXXXXXXXXXXXXX', 'value': orderValue, 'currency': 'USD', 'transaction_id': transactionId } ); } </script> |
See Please read Google’s article on How to Use the Google Tag for Ads Conversion for more information.
To learn more about configuring Google Analytics, see here for more information.
...
For Facebook the following events are fired:
...