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
<script> | |
var dataLayer = window.dataLayer || []; | |
dataLayer.push({ | |
'event':'Transaction', | |
'ecommerce': { | |
'purchase': { | |
'actionField': { | |
'id': '<?php echo $order->get_order_number(); ?>', //Required for purchases and refunds. | |
'revenue': '<?php echo number_format($order->get_subtotal(), 2, ".", ""); ?>', // Total transaction value (incl. tax and shipping) | |
'tax':'<?php echo number_format($order->get_total_tax(), 2, ".", ""); ?>', |