Support » Plugin: WooCommerce » Insert Order Value into Tracking Code

  • Resolved Worcester Web Studio

    (@raymondgillespie)


    I’m trying to integrate the Bing Ads tracking code into WooCommerce so that the order value is passed to Bing. The code I have set up so far is:

    <script>
    (function(w,d,t,r,u){var f,n,i;w[u]=w[u]||[],f=function(){var o={ti:”IDHERE”};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’, ‘revenue_value’: ‘REPLACE_WITH_REVENUE_VALUE’, ‘currency’: ‘GBP’});
    </script>

    However, I’m not sure how to dynamically populate the ‘REPLACE_WITH_REVENUE_VALUE’ field with the order value once an order has been placed. Does anyone have any recommendations?

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Insert Order Value into Tracking Code’ is closed to new replies.