> ## Documentation Index
> Fetch the complete documentation index at: https://data-foundation.rockerbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Microsoft Advertising (Bing)

> Learn how to set up Microsoft Advertising (Bing) integration with Rockerbox

## Overview

Bing does **not** support auto-append. All tracking parameters must be configured manually at the account tracking template level.

## Setup Process

1. Authenticate your Microsoft Advertising account on the [Advertising Platforms](https://app.rockerbox.com/v3/data/marketing/advertising_platforms/connect) page. The authenticating user must have [Super Admin](https://help.ads.microsoft.com/#apex/ads/en/52037/0) access and use a Microsoft **work** account (not personal)
2. Append Rockerbox parameters to the Account tracking template (see below)
3. Contact [support@rockerbox.com](mailto:support@rockerbox.com) with the launch date and the [tier structure](https://help.rockerbox.com/article/obce43haen-1-hierarchy-mappings) you'd like applied
4. The day after launch, confirm tracking is applied on the [Advertising Platforms](https://app.rockerbox.com/v3/data/marketing/advertising_platforms/main) page

<Warning>If migrating from Google Ads, remove **all** `g_` parameters before adding Bing parameters. Bing parameters start with `b_`.</Warning>

## Click Tracking

### Example Parameter String

```text wrap theme={null}
b_campaign={Campaign}&b_campaignid={CampaignId}&b_adgroup={AdGroup}&b_adgroupid={AdGroupId}&b_adid={AdId}&b_keyword={keyword:default}&b_targetid={TargetID}&b_productid={ProductId}&b_ifproduct={IfPLA:product}&b_device={Device}
```

<Accordion title="Parameter Details">
  | Parameter      | Macro               | Description                                 |
  | -------------- | ------------------- | ------------------------------------------- |
  | `b_campaign`   | `{Campaign}`        | Campaign name (required)                    |
  | `b_campaignid` | `{CampaignId}`      | Campaign ID (required)                      |
  | `b_adgroup`    | `{AdGroup}`         | Ad Group name (required)                    |
  | `b_adgroupid`  | `{AdGroupId}`       | Ad Group ID (required)                      |
  | `b_adid`       | `{AdId}`            | Ad ID (required)                            |
  | `b_keyword`    | `{keyword:default}` | Search keyword (required)                   |
  | `b_targetid`   | `{TargetID}`        | Target ID (required)                        |
  | `b_productid`  | `{ProductId}`       | Product ID for Shopping (required)          |
  | `b_ifproduct`  | `{IfPLA:product}`   | Product conditional for Shopping (required) |
  | `b_device`     | `{Device}`          | Device type                                 |
</Accordion>

### Account-Level Implementation

1. In Microsoft Advertising, go to **Tools > Account settings**
2. Click the **Tracking** tab
3. Add parameters to the **Account tracking template** field:
   * **New template:** Start with `{lpurl}?` before the Rockerbox parameters
   * **Existing template:** Use `&` to separate existing parameters from Rockerbox parameters

<Warning>Bing uses the **lowest-level** tracking template in the hierarchy. If any lower-level template exists (ad, ad group, campaign, or sitelink extension), it will override the account-level template. Either remove all lower-level templates (recommended) or manually add Rockerbox parameters to each one.</Warning>

## Spend

Spend is ingested automatically via API after authentication. Spend data refreshes daily.

## Troubleshooting

### Azure Tenant Error

If you receive the error `AADSTS650052`:

1. Ensure you are using a Microsoft **work** account
2. Have your Azure tenant admin log into the [Azure portal](https://portal.azure.com/) and enable **Allow user consent for apps** in user consent settings
3. Log into Bing Ads to complete provisioning

## Resources

* [Bing Account Templates Documentation](https://help.bingads.microsoft.com/#apex/3/en/56772/2)
* [Bing Macros Reference](https://help.bingads.microsoft.com/#apex/3/en/56799/2)
* [What tracking or URL parameters can I use?](https://help.ads.microsoft.com/apex/index/3/en/56799)
* [Test your URL tracking](https://help.ads.microsoft.com/apex/index/3/en/56859)

## Verification

After setup:

1. Confirm tracking is applied on the [Advertising Platforms](https://app.rockerbox.com/v3/data/marketing/advertising_platforms/main) page
2. Verify spend data appears in Rockerbox dashboard
3. Contact [support@rockerbox.com](mailto:support@rockerbox.com) for QA assistance
