> For the complete documentation index, see [llms.txt](https://docs.chord.co/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.chord.co/activate/event-streaming/destinations/advertising/microsoft/microsoft-uet-tag.md).

# Microsoft UET tag

**Microsoft Advertising**, formerly Bing Ads, is a pay-per-click (PPC) advertising platform that allows businesses to display ads across Microsoft's search network, including Bing, Yahoo, and AOL. It helps brands reach users through search results, partner websites, and native placements, offering targeting options based on keywords, location, demographics, and device type.

Chord supports the Microsoft Advertising UET (Universal Event Tracking) tag. The UET tag is a piece of code provided by Microsoft Advertising that you place on your website to track what visitors do after clicking on your ad. Specifically, it collects data on actions like purchases, form submissions, or page views, helping you measure ad performance, build remarketing lists, and enable automated bidding strategies. In short, it connects your site behavior with your Microsoft Advertising campaigns so you can optimize for better results.

This is the browser version of Microsoft's tracking. For the server version, see [Microsoft Conversions API](/activate/event-streaming/destinations/advertising/microsoft/microsoft-conversions-api.md). See [Microsoft](/activate/event-streaming/destinations/advertising/microsoft.md) for why to use both and how the two deduplicate.

## Getting started

You need your Microsoft Advertising Universal Event Tracking (UET) Tag ID, found in your Microsoft Advertising dashboard.

## Settings

* **Destination Name** (required): a name to tell this destination apart.
* **Tag ID** (required): your Microsoft Advertising UET Tag ID.
* **Ad Consent Category** (optional): the consent category from your consent tool that controls advertising consent. When you set it, Chord tells UET that `ad_storage` is denied before the tag loads. It then updates `ad_storage` to granted or denied from each event's choice for the category. Choose "None" to turn consent mode off for this destination. Set the same category on [Microsoft Conversions API](/activate/event-streaming/destinations/advertising/microsoft/microsoft-conversions-api.md) so both send the same consent signal.
* **Consent Requirements** (optional): the consent categories a visitor must accept before Chord sends data to this destination. See [Consent](/activate/event-streaming/consent.md).

## Connect

Add **Bing Ads (UET Tag)** from the destination catalog, using the settings above. See [Connect a destination](/activate/event-streaming/connect-a-destination.md) for the full steps.

## Enhanced conversions

On every event, Chord checks for an email and a phone number to set enhanced conversions data through Microsoft's UET SDK. This helps Microsoft match conversions to signed-in users for better attribution.

**UET SDK call:** `uetq.push("set", { pid })`

| Chord source (priority order)               | Microsoft field | Notes |
| ------------------------------------------- | --------------- | ----- |
| `properties.email` > `context.traits.email` | `pid.em`        |       |
| `properties.phone` > `context.traits.phone` | `pid.ph`        |       |

Chord sends this before the event whenever an email or phone number is available.

## Event mapping

Chord sends page and track events. Identify events are not sent.

## Page

Fires a UET page load event.

**UET SDK call:** `uetq.push("pageLoad")`

No additional attributes are sent with page events.

## Track

All track events are sent as custom UET events using the modern event format. There is no event-name-specific mapping, so every track event uses the same format. An Order Completed with no products is skipped, with a console warning, so an empty cart never reports a purchase.

**UET SDK call:** `uetq.push("event", eventAction, eventData)`

| Chord source (priority order)                                                                                                        | Microsoft field  | Notes                                                                                                                                                                                                                                                                 |
| ------------------------------------------------------------------------------------------------------------------------------------ | ---------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `event` (the Chord event name)                                                                                                       | *(event action)* | Second argument to `uetq.push("event", ...)`                                                                                                                                                                                                                          |
| `properties.category`                                                                                                                | `event_category` | Omitted if not present                                                                                                                                                                                                                                                |
| `properties.revenue` > `properties.total` > `properties.value` > `properties.price` > the sum of each product's price times quantity | `revenue_value`  | Conversion revenue; omitted if none is present                                                                                                                                                                                                                        |
| Same as `revenue_value`                                                                                                              | `event_value`    | Duplicate of `revenue_value`; sent because some Microsoft Advertising conversion goals read this field instead                                                                                                                                                        |
| `properties.currency` > `properties.meta.i18n.currency`                                                                              | `currency`       | Defaults to `"USD"`                                                                                                                                                                                                                                                   |
| `properties.order_id` > `properties.orderId` > `properties.id` > `properties.cart_id`                                                | `transaction_id` | Omitted if none is present                                                                                                                                                                                                                                            |
| The same value as `transaction_id`                                                                                                   | `event_id`       | Order Completed and Order Placed only. Used for deduplication with the Microsoft Conversions API. Omitted if the purchase has no ID. A cart ID counts as an ID, so a purchase with only a cart ID sends the cart ID, and the Microsoft Conversions API won't match it |
| `properties.shipping`                                                                                                                | `shipping`       | Shipping cost; omitted if not present                                                                                                                                                                                                                                 |
| `properties.tax`                                                                                                                     | `tax`            | Tax amount; omitted if not present                                                                                                                                                                                                                                    |

Chord also sends every other property on the event. See [Custom property forwarding](#custom-property-forwarding).

The action name is the Chord event name as is. Microsoft matches it case-sensitively, so a conversion goal in Microsoft Advertising needs the same spelling. For example, `Order Completed`.

## Custom property forwarding

Chord sends every other property on the event with its conversion, except `email`, `phone`, `phone_number`, `first_name`, `last_name`, `firstName`, `lastName` and `phoneNumber`. This includes properties you add with destination mappings in Chord. The attributes in the table above win when Chord computes a value for them. If Chord has no value, a property with the same name is sent as is.

## Initialization

Chord uses Microsoft's standard inline initialization pattern. It sets up the `uetq` queue array, adds a script element for `//bat.bing.com/bat.js`, and on script load initializes the UET object with `{ ti: tagId, enableAutoSpaTracking: true }` followed by an initial `pageLoad` call. If the script fails to load, later events are silently dropped.

## CSP requirements

If your site uses a Content Security Policy, allow the following domains:

| Directive     | Domain                 |
| ------------- | ---------------------- |
| `script-src`  | `https://bat.bing.com` |
| `connect-src` | `https://bat.bing.com` |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.chord.co/activate/event-streaming/destinations/advertising/microsoft/microsoft-uet-tag.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
