How to Set Up Bing Conversion Tracking Goals for WooCommerce: A Newbie-Friendly Guide
Want to know if your Bing Ads are *actually* driving sales on your WooCommerce store? Then you *need* to set up conversion tracking. Think of it like this: you’re running a bake sale, but blindfolded. You’re just yelling about your cookies without knowing if anyone’s buying! Conversion tracking removes the blindfold, letting you see which ads are bringing in the customers (and which are just wasting your money). This guide breaks down how to set up Bing conversion tracking goals for your WooCommerce store, even if you’re a complete newbie.
Why Bother with Conversion Tracking?
Before we dive into the “how,” let’s quickly cover the “why.” Conversion tracking is *essential* for a few key reasons:
- Measure ROI: Are your Bing Ads campaigns profitable? Conversion tracking shows you the return on your investment, telling you how much revenue each dollar spent is generating.
- Optimize Your Campaigns: Knowing which keywords, ads, and landing pages are leading to conversions allows you to focus your efforts on what works and cut out what doesn’t. For example, you might find that ads featuring a specific product image convert much better than others.
- Improve Your Targeting: Conversion data helps you refine your audience targeting, ensuring you’re reaching the right customers who are most likely to buy. Think of targeting people who are in the market for “Organic Coffee” instead of generally targeting people who like “Coffee”.
- Make Data-Driven Decisions: Stop guessing! Conversion tracking provides concrete data to inform your marketing decisions, leading to better results.
- Using a Plugin (Recommended for Beginners): The easiest method is to use a plugin. Several free and paid plugins can help you install the UET tag. Search for “Bing Ads” or “UET Tag” in the WordPress plugin directory. Some popular choices include:
- Insert Headers and Footers: Allows you to inject the UET tag code into the header of your website.
- Pixel Cat: This plugin supports Bing Ads (among others) and provides more advanced conversion tracking features.
- Manually Adding Code (More Advanced): You can also manually add the UET tag to your theme’s `header.php` file. However, *be extremely careful* when editing theme files directly, as mistakes can break your website. Always back up your site before making any changes.
In short, if you’re running Bing Ads without conversion tracking, you’re flying blind and wasting money.
The Two Main Methods: UET Tag and Goal Setting
Bing conversion tracking primarily relies on the Universal Event Tracking (UET) tag and conversion goals. The UET tag is a piece of code that you add to your website (think of it like a tiny spy that reports back to Bing). Conversion goals tell Bing *what* events you consider to be valuable (e.g., a purchase).
Here’s a high-level overview of the process:
1. Create a UET Tag: Generate a unique UET tag in your Bing Ads account.
2. Install the UET Tag: Add the UET tag to all pages of your WooCommerce store.
3. Define Conversion Goals: Specify which actions on your website constitute a conversion (e.g., reaching the “thank you” page after purchase).
4. Verify Your Setup: Ensure that your UET tag and conversion goals are firing correctly.
Step-by-Step Guide: Setting Up Bing Conversion Tracking
Let’s break down each step in more detail.
#### 1. Create a UET Tag in Bing Ads
1. Log in to your Bing Ads account.
2. Go to Tools > UET tag.
3. Click Create UET tag.
4. Give your tag a descriptive name (e.g., “WooCommerce Store UET”).
5. Add a description to the tag.
6. Click Save.
You’ll now see your UET tag listed, along with its ID. Keep this ID handy; you’ll need it later.
#### 2. Install the UET Tag on Your WooCommerce Store
There are several ways to install the UET tag on your WooCommerce store:
To use a plugin like “Insert Headers and Footers”:
1. Install and activate the plugin.
2. Go to Settings > Insert Headers and Footers.
3. Copy the UET tag code from Bing Ads (you’ll see it displayed after creating the tag).
4. Paste the UET tag code into the Scripts in Header section.
5. Click Save.
(function(w,d,t,r,u){var f,n,i;w[u]=w[u]||[],f=function(){var o={ti:"YOUR_UET_TAG_ID"};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");![]()
Replace `YOUR_UET_TAG_ID` with your actual UET tag ID.
To manually add the code:
1. Go to Appearance > Theme Editor in your WordPress dashboard.
2. Find the `header.php` file (usually located under Theme Header).
3. Paste the UET tag code (with your ID replaced) *just before* the “ tag.
4. Click Update File.
#### 3. Define Conversion Goals in Bing Ads
Now that your UET tag is installed, you need to tell Bing what constitutes a conversion. For a WooCommerce store, the most common conversion goal is a purchase.
1. In Bing Ads, go to Tools > Conversion goals.
2. Click Create conversion goal.
3. Choose Website as the conversion source.
4. Select Destination URL as the goal type. This is the easiest method for WooCommerce.
5. Give your goal a descriptive name (e.g., “WooCommerce Purchase”).
6. Under Destination URL, choose URL contains. Enter the URL fragment that appears on your order confirmation or “thank you” page Learn more about How To Display Woocommerce Product Categories On Shop Page after a successful purchase. This will typically contain a string like “/checkout/order-received/” or “/order-confirmation/” or “/thank-you/” (check your own WooCommerce setup to find the exact URL). *Important: Don’t include the full domain name, just the part after the forward slash.*
7. Under Revenue Tracking, select either:
- Don’t assign a value. Use this if you don’t want to track revenue, or if you’re setting up conversions for something other than purchases (like lead form submissions).
- The conversion value may vary. This is what you’ll use for purchases. You’ll configure this with a PHP code snippet in the thank you page later (explained below).
8. Set the Scope to “All accounts” if you want to track conversions across all your Bing Ads accounts, or choose a specific account.
9. Click Save.
#### 4. Dynamic Revenue Tracking (Advanced but Crucial for ROI)
Using the Destination URL goal will track *if* a purchase happened, but to see the *value* of each conversion, you need to dynamically pass the order value to Bing. This requires a bit of PHP code.
Here’s how:
1. Edit Your `functions.php` File (Carefully!): Go to Appearance > Theme Editor in your WordPress dashboard. Locate the `functions.php` file (usually under Theme Functions). *Back up your site first!*
2. Add the following code:
add_action( 'woocommerce_thankyou', 'bing_conversion_tracking' );
function bing_conversion_tracking( $order_id ) {
$order = wc_get_order( $order_id );
$revenue = $order->get_total(); // Get the order total
// Output the Bing conversion tracking script with dynamic revenue
?>
if (typeof uetq !== ‘undefined’) {
uetq.push(‘event’, ‘Purchase’, {
‘revenue_value’: , // Pass the order total
‘currency’: ‘get_currency() ); ?>’ // Pass the currency code
});
}
<?php
}
3. Explanation of the Code:
- `add_action( ‘woocommerce_thankyou’, ‘bing_conversion_tracking’ );`: This line tells WordPress to run the `bing_conversion_tracking` function whenever the “thank you” page is displayed after a purchase.
- `$order = wc_get_order( $order_id );`: This retrieves the order information based on the order ID.
- `$revenue = $order->get_total();`: This gets the total value of the order.
- `$order->get_currency();`: Gets the currency of the order.
- The “ block then sends a custom event to Bing Ads (using `uetq.push(‘event’, ‘Purchase’, …)`). The `revenue_value` is set to the order total, and the currency of the order is set correctly, which provides Bing Ads with the crucial information for your ROI calculations.
4. Important Notes:
- This code assumes you’re using a standard WooCommerce setup. If you’ve heavily customized your order process or thank you page, you may need to adjust the code.
- The currency should match the one that is setup in your WooCommerce account.
- This code is a starting point. You can add other relevant order details to the `uetq.push()` call, such as the order ID or product IDs.
#### 5. Verify Your Setup
After installing the UET tag and defining your conversion goals, it’s crucial to verify that everything is working correctly.
- Use the UET Tag Helper Browser Extension: Bing provides a browser extension called “UET Tag Helper” (available for Chrome and Edge) that allows you to check if your UET tag is firing correctly and if your conversion goals are being triggered.
- Place a Test Order: The best way to ensure everything works is to place a test order on your store and see if the conversion is tracked in Bing Ads. Check your conversion reports in Bing Ads to see if the purchase is recorded. Note that it may take a few hours for the conversion to show up.
Common Problems and Troubleshooting
- UET Tag Not Firing: Double-check that you’ve installed the UET tag correctly on *all* pages of your website. Use the UET Tag Helper extension to verify.
- Conversions Not Tracking: Ensure that your destination URL is correct and that it accurately reflects the URL of your order confirmation page. Check your `functions.php` code for errors.
- Revenue Not Tracking: Ensure that the revenue is being sent back to Bing Ads in the right format.
Conclusion
Setting up Bing conversion tracking for WooCommerce may seem daunting at first, but it’s a vital step in maximizing the ROI of your advertising efforts. By following this guide, you can start tracking your conversions, optimizing your campaigns, Learn more about How To Sell Gift Cards Woocommerce and making data-driven decisions that will help you grow your business. Good luck, and happy tracking!