> For the complete documentation index, see [llms.txt](https://help.branch.io/llms.txt).

# Enable Microsoft Advertising (New)

> Integrate Microsoft Advertising with Branch to track clicks and installs from Bing and Yahoo ads, optimizing your app's performance.

## Overview

[Microsoft Advertising](https://about.ads.microsoft.com/) (formerly Bing Ads) is a search advertising platform that runs pay-per-click ads across the Bing and Yahoo search networks. Connect Microsoft Advertising to Branch to attribute clicks and installs from your search campaigns and forward install Postbacks for your app.

For more information about integrating ad partners in general, visit our [Ad Partner Integration Guide](https://help.branch.io/marketer-hub/ad-partner-integration-guide-new.md).

> **Note: this guide is for new Branch**
>
> Please note that this guide is about integrating Microsoft Advertising in the [new Branch experience](https://help.branch.io/marketer-hub/new-branch-overview.md). For information on Microsoft Advertising in legacy Branch, visit our [legacy guide](https://help.branch.io/marketer-hub/bing-ads.md).

### Partner capabilities

| Capability | Details |
| --- | --- |
| Company type | Search advertising platform |
| Deep linking | Supported |
| Attribution | Click-through attribution |
| Ad campaign types | Acquisition campaigns (app install) |
| Supported platforms | iOS, Android, Windows |
| Link wrapping | Not supported |
| Cost ingestion support | Not supported |
| Pricing models | CPC |

## Before you begin

To set up the Microsoft Advertising integration, you need:

- Ad partner integrations enabled for your Branch account. Availability varies by Branch plan. See [Branch pricing](https://www.branch.io/pricing/) or contact your Branch representative.
- A Branch account with access to **Configuration > Ad Partners** and admin permissions to enable and configure integrations.
- The Branch SDK implemented in your app ([iOS](https://help.branch.io/developer-hub/ios-sdk-overview.md) | [Android](https://help.branch.io/developer-hub/android-sdk-overview.md)) with [event tracking](https://help.branch.io/developer-hub/track-branch-events.md) configured.
- A Microsoft Advertising account with admin access.
- [PAM](https://help.branch.io/marketer-hub/predictive-aggregate-measurement.md) enabled (recommended).

> **Note: PAM uses two separate toggles**
>
> The **PAM for Publishers** toggle for this partner, found under **Partner settings** > **Manage account**, is separate from the account-level **PAM switch**. **PAM for Publishers** must be enabled to reconcile conversion events with your partner. To attribute events with PAM, you also need PAM enabled on the [Attribution page](https://help.branch.io/account-hub/attribution-page-new.md) under **Configuration** > **Attribution**. Learn more in our [PAM Overview](https://help.branch.io/marketer-hub/predictive-aggregate-measurement.md#pam-for-publishers).

## Enable Microsoft Advertising

To begin, navigate to **Configuration > Ad Partners > Bing Ads**.

Branch enables Microsoft Advertising automatically. On the **Status** tab, the **Ad Linking**, **Attribution**, and **Postbacks** cards show **Enabled**, and the page confirms **Partner is enabled**. No additional credentials are required to begin attributing clicks and installs.

(Recommended) To configure the optional **PAM for Publishers** privacy setting, select **Partner settings** to open the **Manage account** dialog and enable the toggle. When enabled, [PAM for Publishers](https://help.branch.io/marketer-hub/predictive-aggregate-measurement.md#pam-for-publishers) removes advertiser-specific user identifiers from postbacks for users who haven't opted in via Apple's App Tracking Transparency (ATT) framework, prioritizing identifiers provided directly by Microsoft Advertising.

## Configure attribution

By default, Microsoft Advertising uses your global app attribution settings. To set attribution windows specific to Microsoft Advertising, enable the **Override global app settings** toggle on the **Attribution windows** tab.

For more information, follow [Configure attribution](https://help.branch.io/marketer-hub/ad-partner-integration-guide-new.md#configure-attribution) in the general [Ad Partner Integration Guide](https://help.branch.io/marketer-hub/ad-partner-integration-guide-new.md).

## Configure postbacks

Microsoft Advertising supports the `INSTALL` postback only. Enabling the integration automatically activates the `INSTALL` postback. The default postback URL template is:

```
http://bat.bing.com/action/aips?attvenid=1030&dappid=<@loop data=app.app_bundles val="bundle"><#if user_data.os == bundle.os><#if bundle.os=="ANDROID"><@break/><#elseif bundle.os == "IOS">${(bundle.ios.itunes_id?substring(2))!}</#if><@break/></#if></@loop>&sappid=${ (app.name)! }&tmstmp=${ (timestamp/1000)?long }&event=Install&plat=${ (user_data.os)! }&device=${ (user_data.model)! }&devicetype=${(user_data.device_type)!}&devicemodel=${ (user_data.model)! }&devicemanufacturer=${(user_data.brand)!}&bclid=${ (last_attributed_touch_data.~click_id)! }&ea=${ (name)! }
```

To review or manage postbacks, select the **Postback config** tab on the Bing Ads page. To customize postback behavior, follow [Configure postbacks](https://help.branch.io/marketer-hub/ad-partner-integration-guide-new.md#configure-postbacks) in the general [Ad Partner Integration Guide](https://help.branch.io/marketer-hub/ad-partner-integration-guide-new.md).

> **Note: install postback only**
>
> Microsoft Advertising supports the `INSTALL` postback only. Other Branch events are not forwarded to Microsoft Advertising.

## Create a Branch Ad Link

Create a Branch Ad Link to use in your Microsoft Advertising campaigns. Branch uses the link to attribute clicks and installs and deep link users into your app. Follow [Create Ad Links](https://help.branch.io/marketer-hub/ad-links-new.md).

For Microsoft Advertising app install campaigns, replace the default app store URL with your Branch Ad Link. Run separate links for your iOS and Android campaigns, and set each campaign's desktop redirect to the platform-specific app store (for example, set an Android campaign link's desktop redirect to the Google Play listing).

> **Caution: URL precedence**
>
> Microsoft Advertising prioritizes keyword-level final URLs over ad-level URLs. If a keyword-level URL is set, Branch can't register the click and users won't be routed through the Branch link. Apply your Branch Ad Link at the highest level of URL precedence (keyword, ad, or campaign), or remove the final URL at the keyword level so the Branch link is used.

## Verify your data

After your integration is connected and events are flowing, you can verify data is reaching Branch and Microsoft Advertising:

- **In Branch** [**Liveview**](https://app.branch.io/testing-and-monitoring/events): confirm that events from your app appear in real time. This is the fastest way to confirm SDK events are firing.
- **In Branch** [**Analysis dashboards**](https://help.branch.io/marketer-hub/analysis-dashboards-overview-new.md): review attributed installs where `Ad Partner Name = Bing Ads`.
- **In Microsoft Advertising**: confirm that forwarded installs are appearing in your Microsoft Advertising conversion reporting.

## Data mappings

### Campaign data

Branch populates the following fields from Microsoft Advertising campaign data.

| Branch field | Partner data |
| --- | --- |
| `~advertising_partner_name` | `"Bing Ads"` (static) |
| `~feature` | `"paid advertising"` (static) |
| `~campaign` | `Campaign` |
| `~campaign_id` | `CampaignId` |
| `~ad_set_name` | `AdGroup` |
| `~ad_set_id` | `AdGroupId` |
| `~ad_id` | `AdId` |
| `~keyword` | `keyword:default` |
| `~click_id` | `msclkid` |
