Skip to content
Browse documentation

Microsoft Advertising

Track Microsoft Advertising (Bing) clicks with a transparent template or Final URL suffix, send conversions through the UET Conversions API, and import campaign costs.

Last updated 5 min read

On this page

Microsoft Advertising uses the same transparent /c/ link as Google Ads, with its own URL parameters and click ID (msclkid). This article covers the tracking template, how its parameters are stored, the UET Conversions API and cost import. What is not available for Microsoft: offline conversion feeds and API conversion uploads (those exist for Google Ads only).

Microsoft has no click-tracker certification programme, so the certification gate in the builder does not apply.

Build the template#

  1. Open Google Ads → Tracking template.
  2. In the platform switch choose Microsoft Advertising.
  3. Pick the Tracking domain and Link key (see Tracking template builder).
  4. Under Microsoft URL parameters keep the defaults or add more.
  5. Add custom parameters if needed — Microsoft ad extensions accept at most 3 (the builder warns above 3).
  6. Copy the template.

Default template:

URL
https://trackcrown.com/c/KEY?msclkid={msclkid}&CampaignId={CampaignId}&AdGroupId={AdGroupId}&AdId={AdId}&keyword={keyword}&MatchType={MatchType}&Network={Network}&Device={Device}&force_transparent=true&url={lpurl}

Paste it into Microsoft Advertising#

  1. Go to Settings → Account level options → Tracking template (or the campaign / ad group URL options).
  2. Paste the template and keep Final URL suffix empty.
  3. Enable auto-tagging of msclkid, so the click ID also reaches the landing page.

Microsoft imports Google Ads campaigns with their templates; replace imported Google templates with this one so Microsoft's own parameters are filled.

Parameters and where they are stored#

Parameter names are case-insensitive on our side: CampaignId fills the same column as campaignid.

ParameterLabel in the builderStored asReport dimension
msclkidMicrosoft click IDMicrosoft click ID; sets traffic source microsoft—
CampaignIdCampaign IDcampaign IDCampaign ID
AdGroupIdAd group IDad group IDAd group ID
AdIdAd IDad / creative IDAd / creative ID
keywordKeywordkeywordKeyword
MatchTypeDelivered match type (e / p / b)match typeMatch type
NetworkNetwork (o / s / a)networkNetwork (Google)
DeviceDevice (m / t / c)deviceDevice (Google)
TargetIdTarget ID (kwd / aud / loc)target ID; kwd- and aud- parts split outKeyword criterion ID, Audience ID
QueryStringSearch querysearch term (click detail only)—
OrderItemIdKeyword ID (order item)extra click parameter—
BidMatchTypeBidded match typeextra click parameter—

Codes: {Network} o = Microsoft owned and operated search (Bing, AOL, Yahoo), s = syndicated search partners, a = Microsoft Audience Network. {BidMatchType} be / bp / bb / bc = bidded exact / phrase / broad / contextual. {MatchType} e / p / b. {Device} m / t / c.

If msclkid is not in the template, the tracker still reads it from the landing page in url= when auto-tagging added it there.

Template rules#

The linter runs with Microsoft rules:

  • The template must be https:// on one of your tracking domains, with url={lpurl} last (same as Google).
  • Maximum 2,048 characters.
  • Unknown tags are warnings, not errors (Microsoft's catalogue differs per campaign type).
  • No msclkid → warning missing_msclkid.
  • The Final URL suffix must not start with ?, & or # and never contains {lpurl} or {ignore}.

No redirect wanted? Choose Final URL suffix + SDK in the builder — the SDK then records the click from the landing page, see Final URL suffix + SDK.

Send conversions with the UET Conversions API#

Approved conversions of Microsoft clicks can be reported server-side to your UET tag.

  1. Open Integrations → Conversion APIs (Admin role).
  2. On Microsoft UET Conversions API click Add.
  3. Fill in the form:
FieldNotes
NameOptional label.
UET tag IDNumeric (4–20 digits): Microsoft Advertising → Tools → UET tag.
Conversions API tokenUET tag → Conversions API → Generate token. Stored encrypted; leave empty when editing to keep it.
SendApproved conversions, or Approved and pending.
ValueRevenue, Sale amount, Payout or No value.
OfferAll offers or one offer.
Event codeEmpty = every non-private event.
Event namesOne per line: sale = purchase. Unmapped codes use the defaults: default → lead, sale → purchase, purchase → purchase.
StatusActive or Paused.
  1. Save, then choose Send test event in the destination's menu. It posts one synthetic event (event name with a _test suffix, value 1 USD) and shows Microsoft's answer. Microsoft has no test-event code, so the test reaches your live tag.

Each conversion is sent to https://capi.uet.microsoft.com/v1/<UET tag ID>/events with Authorization: Bearer <token>:

JSON
{
  "data": [{
    "eventType": "custom",
    "eventId": "8a6a2d0e-3c55-4c7e-9a43-0c1c2d8f0b11",
    "eventName": "purchase",
    "eventTime": 1791624662,
    "adStorageConsent": "G",
    "eventSourceUrl": "https://shop.example.com/sale",
    "userData": {
      "msclkid": "a1b2c3d4e5f6",
      "clientIpAddress": "198.51.100.20",
      "clientUserAgent": "Mozilla/5.0 …",
      "em": "<sha256>",
      "ph": "<sha256>",
      "externalId": "<sha256 of the click ID>"
    },
    "customData": { "value": 49.9, "currency": "USD", "transactionId": "ORDER-1001" }
  }]
}

eventId is the conversion ID, so Microsoft can de-duplicate it against your browser UET tag. msclkid, IP address, user agent and page URL come from the attributed click; hashed e-mail and phone from the postback's email / em and phone / ph parameters. Deliveries, retries (1 min, 5 min, 30 min, 2 h, 6 h) and Microsoft's responses appear in the postback log; 4xx answers other than 429 are not retried.

Import costs#

  1. A platform admin enters the Microsoft Advertising app on Ad platform apps (/admin/integrations): OAuth client ID, client secret, developer token.
  2. In the workspace open Integrations → Ad costs & ROAS and add a Microsoft ad account: Account ID, optional Customer ID, and an OAuth refresh token for that app (scope msads.manage). There is no in-panel OAuth flow for Microsoft — generate the refresh token yourself.
  3. Yesterday and today are imported every 3 hours (Reporting API v13), per campaign and day.

Revenue is matched to the cost by CampaignId; see Ad costs & ROAS.

Something unclear or missing in this article?Tell us