• Skip to main content
  • Skip to header right navigation
  • Skip to site footer

Vi Wickam

Loveland Colorado Online Marketing, Website Design and Ecommerce web development

  • Home
  • Meet Vi
  • What Vi Does
    • Website Creation
    • Big Picture Online Marketing
  • Blog
  • Contact
March 13, 2016 by Vi Wickam

Bing Ads Ecommerce Conversion Tracking (Revenue Reporting) for Magento

Tracking the Magento sales revenue generated from your Bing Advertising is something that lots of people want to do, but it’s not documented anywhere in the Bing Ads site.

The first step to tracking your Bing ads on Magento is to add the Bing UET Code to your site. They recommend that you add it in the head of every page of the site as the last item in the head. Bing UET Code is kind of like their equivalent to Google Analytics code. It allows for conversion tracking as well as setting up goals, which could be for things like add to cart, or proceed to checkout, as well as completing checkout.

<head>
{Meta tags and stylesheets, other javascript, etc.}
{Bing UET Code Goes here}
</head>

There is a whole section on how to setup Universal Event Tracking (UET) on the Bing Help website:

http://help.bingads.microsoft.com/apex/index/3/en-us/n5012

In Magento, the file I used for adding the code to the head at the bottom of the file:

{your magento home}/app/design/frontend/{your package}/{your theme}/template/page/html/head.phtml

After you have successfully added the UET Code to every page on your site, the next thing to do is to setup a goal for completing a checkout.

In the bing ads control panel,  you do this by going to Conversion Tracking in the left side bar, and then to Conversion Goals. Next Click Create Conversion Goal. The screenshots below should help you through this step.

Bing Conversion Goals Page
Bing Conversion Goal Step 1
Bing Conversion Goal Step 2

 

This is the code that you add to your success.phtml file to get the revenue value transmitted to Bing. I recommend putting it at the very end of the file. If you don’t know where to find this file, go to:

{your magento home}/app/design/frontend/{your package}/{your theme}/template/checkout/success.phtml

If there is no success.phtml file in that location, copy the file from:

{your magento home}/app/design/frontend/base/default/template/checkout/success.phtml

to your theme’s corresponding location. You may have to create the checkout directory if your theme has no checkout modifications yet.

<script>
<?php $lastOrderId = Mage::getSingleton('checkout/session')->getLastOrderId();
$order = Mage::getSingleton('sales/order')->load($lastOrderId); ?>
window.uetq = window.uetq || []; 
window.uetq.push({ 'gv': '<?php echo $order->getBaseGrandTotal(); ?>'}); // Pass the computed revenue 
</script>
Category: Magento, Online MarketingTag: bing, bing ads, conversion tracking, magento, revenue tracking, uet, universal event tracking

Reader Interactions

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Get a Quote

"*" indicates required fields

1
2
Name*
This doesn't need to be an exact budget, but I need an idea of what the approximate budget is that you are planning on for this project.
Give me some more detail about this project so that I can understand what you have in mind and in what areas you would like me to help you out.
This field is for validation purposes and should be left unchanged.

Copyright © 2023 · Wizard of Ads Online · All Rights Reserved · Vi Wickam is a Wizard of Ads Digital Marketing and Strategy Partner