Microsoft Ads conversion tracking with Google Tag Manager

Updated: Tuesday, January 28, 2025

Getting started…

Microsoft Ads (formerly Bing Ads) allow you to create search campaigns in the same way as Google Ads. Generally speaking, advertising on Microsoft Ads is less expensive than on Google Ads, as there are fewer advertisers taking part in the bids. This advertising network can therefore represent an opportunity for your business, provided there’s demand for the keywords you want to target.

As with Google Ads, your performance depends on quality conversion tracking, which is the foundation of a successful advertising campaign.


I’m going to explain how you can set up Microsoft Ads conversion tracking with Google Tag Manager on your website.

Create the UET tag in Microsoft Ads

Go to Microsoft Ads, hover over the Conversions menu then click on UET tag. Then click on the Create button.

Create a UET tag on Microsoft Ads
Create a UET tag on Microsoft Ads

Give your UET Tag a name, here I’m calling it My New UET Tag. Then select the Install the tag yourself option.

UET Tag installation option
UET Tag installation option

Congratulations, you’ve just created your UET tag.

UET tag created
UET tag created

At this stage, your UET Tag has the status Unverified as no data is being sent to Microsoft Ads at the moment. A little patience, as we’ll see it in the next section.

UET tag status
UET tag status

Send page views to UET tag

Go to Google Tag Manager, in the Tags section of your container click New.

Create a new tag in GTM
Create a new tag in GTM

Then look for the Microsoft Advertising Universal Event Tracking tag in the Choose tag type section.


Searching for the tag Microsoft Advertising Universal Event Tracking in Google Tag Manager
Searching for the tag Microsoft Advertising Universal Event Tracking in Google Tag Manager

Once you’ve selected the tag, you can move on to its configuration.

Configuring the Microsoft Advertising Universal Event Tracking tag in Google Tag Manager
Configuring the Microsoft Advertising Universal Event Tracking tag in Google Tag Manager
  1. UET Tag ID: this identifier is retrieved from the All tags section on Microsoft Ads.
  2. Track type: here we install the basic code, so you can leave this setting as is.
Get UET Tag ID in Microsoft Ads
Get UET Tag ID in Microsoft Ads

Then trigger this tag on all pages.

Trigger Microsoft Advertising Universal Event Tracking tag on all pages
Trigger Microsoft Advertising Universal Event Tracking tag on all pages

Check page views sent with UET Tag Helper

In your GTM container, click on Preview to launch the preview mode. You can then check that the tag has been triggered correctly by clicking on Succeeded.

Checking the triggering of the Microsoft Advertising Universal Event Tracking tag in the GTM preview
Checking the triggering of the Microsoft Advertising Universal Event Tracking tag in the GTM preview

To check that data is being sent to the UET tag, I recommend using the UET Tag Helper extension.

Check event sending with UET Tag Helper
Check event sending with UET Tag Helper

If you can see the Page Load Event, your tag is working properly and sending data to Microsoft Ads.

In the Microsoft Ads interface, our UET Tag has gone from Unverified to Tag active.

The UET Tag is now active
The UET Tag is now active

By clicking on the UET Tag, you can obtain more information. Here, for example, we can see that 10 Page Load events have been received and that Tracking Status is active.

Events received in Microsoft Ads
Events received in Microsoft Ads

Congratulations, you’re now sending page views to Microsoft Ads. The ad network is therefore able to determine whether a visitor has come from a Microsoft ad or not.

Create a conversion goal in Microsoft Ads

A conversion goal is an important event (also known as a macro-conversion) that takes place on your website, such as a purchase or the submission of a contact form.

In this tutorial, we’ll create a purchase conversion goal in Microsoft Ads.

Go to Conversions > Conversion goals then click on Create.

Button to create a conversion goal in Microsoft Ads
Button to create a conversion goal in Microsoft Ads

In conversion type, select Website.

Then select Purchase as the goal category (or other if you don’t want to track a purchase event) and then Event as the conversion type.

Conversion type configuration in Microsoft Ads
Conversion type configuration in Microsoft Ads

We’ll now configure the goal.

Goal configuration in Microsoft Ads
Goal configuration in Microsoft Ads
  1. Name: the name of the conversion goal
  2. Revenue: set Conversion value may vary for a purchase or Each conversion action has the same value for lead generation.
    • For a purchase, you can enter your average order value.
    • For lead generation, you can enter the average lead value.

Then enter the Event Action, here purchase is the default.

Event Action in Microsoft Ads
Event Action in Microsoft Ads

Congratulations, you’ve completed the creation of your conversion goal in Microsoft Ads.

Send a conversion with UET Tag

Now that the conversion goal has been created, we need to send the corresponding event from Google Tag Manager.

In Google Tag Manager, create a new Microsoft Advertising Universal Event Tracking tag. In the Track type menu, select Define your own. Enter purchase as the Event Action.

Configuring the purchase Microsoft Ads event in Google Tag Manager
Configuring the purchase Microsoft Ads event in Google Tag Manager

Variable CJS - ms_items

function() {
  var items = {{DLV - ecommerce.items}};
  var ms_items = [];

  if(items && items.length > 0) {
    items.forEach(function(item) {
      ms_items.push({
        id: item.item_id,
        price: item.price,
        quantity: item.quantity,
        brand: item.item_brand,
        category: item.item_category,
        list_name: item.item_list_name,
        list_position: item.index,
        variant: item.item_variant,
        location_id: item.location_id
      })
    });
  }

  return ms_items;
}

CJS variable - pid

function() {
  return {
    email: {{DLV - email}},
    phone_number: {{DLV- phone}}
  }
}

You can also provide additional information if available in your Data Layer via the Define your own event parameters section.


Check sent conversion with UET Tag Helper

To check that data is being sent to the UET tag, I recommend using the UET Tag Helper extension.

Checking that a conversion has been sent with the UET Tag Helper
Checking that a conversion has been sent with the UET Tag Helper

Enhanced conversion tracking

User data is sent via the pid parameter, as we did previously for our purchase event.

The expected object for this parameter should be constructed as follows:

{
    email: "[email protected]",
    phone_number: "+33658478547"
}

You can also provide this data to the UET Tag before sending events thanks to the page view tag.

Sending user data via the page view tag
Sending user data via the page view tag

The UET Tag consent mode works like the Google Ads consent mode, except that it includes a single consent signal: ad_storage. This signal has two possible values: granted or denied.

This signal can be set up in two modes: default at page load time, and update after user consent has been obtained.

In the European Economic Area, the consent mode is forced to denied in default mode. This means that if you don’t set the UET Consent Mode, all your requests will go to denied. If your IP address is in a European Economic Area country, you’ll see this type of request:

Consent default forced to Denied for UET Consent Mode in EEA
Consent default forced to Denied for UET Consent Mode in EEA

To configure UET Consent Mode, you can use Simo Ahava’s tag and check the Enable Microsoft Consent Mode checkbox.

Configuring UET consent mode with Simo Ahava's tag
Configuring UET consent mode with Simo Ahava's tag

For the most experienced ones

General events and associated parameters

Events description

Event nameAssociated parameters
page_viewpage_title, page_location, page_path, rep, tpp, gtm_tag_source, pid

Parameters description

Tag parameterExample
page_titleExample Title
page_locationhttps://example.com
page_path/example
event_label
event_categoryShoes
revenue_value99
search_termsummer shoes
pid{ email: "[email protected]", phone_number: "+33648754898" }
tpp1
gtm_tag_source

Events description

Recommended eventsAssociated parameters
add_payment_infoFree
add_to_cartrevenue_value, currency, items
add_to_wishlistrevenue_value, currency, items
begin_checkoutrevenue_value, currency, items, coupon
checkout_progressrevenue_value, currency, items, coupon, checkout_step, checkout_option
exceptiondescription, fatal
generate_leadrevenue_value, currency, transaction_id
loginmethod
purchasetransaction_id, revenue_value, currency, tax, shipping, items, coupon
refundtransaction_id, revenue_value, currency, tax, shipping, items
screen_viewscreen_name
remove_from_cartrevenue_value, currency, items
search_term,
select_contentitems, promotions, content_type, content_id
set_checkout_optioncheckout_step, checkout_option
sharemethod, content_type, content_id
sign_upmethod
view_itemitems
view_item_listitems
view_promotionpromotions
view_search_resultssearch_term

Parameters description

Parameter nameExample
items[{ id: 123, brand: "Nike", category: "Shoes", creative_name: "summer", create_slot: "home_1", list_name: "Summer shoes", list_position: 5, location_id: 487, name: "Red summer shoes", price: 97.99, quantity: 1, variant: "Red" }]
promotions[{ creatve_name: "Summer shoes", creative_slot: "home_3", id: "45645", name: "s_shoes" }]
currencyEUR
affiliationmy_best_partner
tax2.8
shipping3.99
couponSUMMER
transaction_id25646413
checkout_optionCard
checkout_step4
content_id134648
content_typeProduct
descriptionThe associated value has the wrong format
fataltrue
methodGoogle SSO

The following parameters can be used in combination with the previous ones to use the dynamic remarketing features of Microsoft Ads.

Parameter nameExample
ecomm_pagetypePossible values: home, searchresults, category, product, cart, purchase, other
ecomm_prodid["123", "456"] or "123"
ecomm_totalvalue48
ecomm_queryred shoes
ecomm_categoryShoes
ecomm_exp

Vertical: Hotel - parameters

Parameter nameExample
hct_base_price448
hct_booking_xrefID001
hct_checkin_date2025-01-14
hct_checkout_date2025-01-20
hct_length_of_stayValue from 0 to 30 - 6
hct_partner_hotel_id489454165
hct_total_price485
hct_pagetypePossible values: home, searchresults, offerdetail, conversionintent, conversion, property, cart, purchase, cancel, other

Vertical: Travel - parameters

Parameter nameExample
travel_destid5645448
travel_originid4878546
travel_pagetypePossible values: home, searchresults, offerdetail, conversionintent, conversion, cancel, other
travel_startdate2025-01-14
travel_enddate2025-01-14
travel_totalvalue489
flight_destid4654556
flight_originid7897564
flight_pagetypePossible values: home, searchresults, offerdetail, cart, purchase, cancel, other
flight_startdate2025-01-14
flight_enddate2025-01-14
flight_totalvalue478

FAQ

No, at the time of writing, Microsoft Ads does not offer a conversion API. Server-side tracking is therefore not currently possible.
The UET Tag Helper extension may not work even if tracking is implemented correctly. If in doubt you can check in the Network tab of Chrome Dev Tools if requests are sent to Microsoft Ads.

Didn't find what you were looking for?

Get help from the Data Marketing Club

Join the Data Marketing Club