Glad i could be of help!
Instead of my above code. i use this now, it’s simpler:
First this:
// This is the order total
$order->get_total();
$revenue = $order->get_total();
Still basically the same and replaces the value for $revenue.
Then replace with this:
<script>
(function(w,d,t,r,u){var f,n,i;w[u]=w[u]||[],f=function(){var o={ti:"<?php echo (get_option('bing_uet_tracking_code')); ?>"};o.q=w[u],w[u]=new UET(o),w[u].push("pageLoad")},n=d.createElement(t),n.src=r,n.async=1,n.onload=n.onreadystatechange=function(){var s=this.readyState;s&&s!=="loaded"&&s!=="complete"||(f(),n.onload=n.onreadystatechange=null)},i=d.getElementsByTagName(t)[0],i.parentNode.insertBefore(n,i)})(window,document,"script","//bat.bing.com/bat.js","uetq");
window.uetq = window.uetq || [];
window.uetq.push('event', 'purchase', {'event_category': 'sale', 'event_value': '<?php echo $revenue; ?>', 'revenue_value': '<?php echo $revenue; ?>', 'currency': '<?php echo (get_option('bing_tracking_currency')); ?>'});
</script>
-
This reply was modified 3 years, 4 months ago by kattouf.