Skip to content
Browse the docs

Microsoft Advertising

Microsoft Advertising has no way for an app to add IP exclusions. Spurn keeps flagged visitors away from your Microsoft ads with an exclusion audience instead, and imports your campaign stats.

What is and is not possible#

Microsoft only takes IP exclusions typed into its web interface: up to 100 per campaign, IPv4 only, with a * allowed in the last part of the address. There is no API for them, at campaign or account level, and Microsoft's own staff have confirmed it. No tool can push IPs to Microsoft Advertising automatically.

What can be automated is an audience:

  1. When Spurn flags a visitor, the Spurn tag on your page fires a Microsoft UET custom event, spurn_invalid.
  2. Spurn keeps a remarketing list in your account built from that event: Spurn: invalid traffic (exclude), with a 90-day membership.
  3. Spurn attaches the list as a negative audience to every active Search, Shopping, Performance Max and Audience campaign, and to new ones within the hour.

Flagged visitors then stop seeing your ads on Microsoft's network. This works on repeat visits: the first click from a visitor has already happened by the time they are flagged. It also depends on Microsoft recognising the visitor through its UET cookie, so a bot that throws its cookies away is not caught this way. Microsoft documents a 300-person minimum for audiences used to optimise campaigns, and does not say whether exclusions apply below it.

The audience is part of automatic blocking, so it comes with every paid plan.

What you need#

  • Microsoft's UET tag on your site. The remarketing list is built from UET events. If you run Microsoft ads with conversion tracking, you already have it.
  • The Spurn tag on your site, on the same pages. It fires the event when the UET tag is present.
  • The UET tag chosen in Spurn, when your Microsoft account has more than one. Spurn picks it for you when there is only one.

Connect your account#

  1. In Spurn, open Ad accounts and choose Connect Microsoft Advertising.
  2. Sign in with the Microsoft account that manages your ads. Microsoft requires multi-factor sign-in for API access.
  3. Back in Spurn, your Microsoft Advertising accounts are listed. Enable the ones to protect and link each to the sites its ads land on.
  4. If the account has several UET tags, choose the one on your site in the account's settings.

Within the hour Spurn creates the remarketing list and attaches it. The account's page shows which campaigns carry it, and any campaign Microsoft refused, with Microsoft's reason.

Stats#

Spurn imports per-campaign clicks, cost and conversions every hour from Microsoft's reports. Microsoft has no click-level report, so Spurn cannot prove which clicks were billed or find ghost clicks there. Refund claims for Microsoft list the flagged clicks that reached your site carrying an msclkid, and say plainly that Microsoft does not publish click-level billing.

Blocking IPs by hand#

For a network you want out of Microsoft entirely, copy it from Spurn's block list and add it in Microsoft Advertising: open the campaign, then Settings, then IP exclusions. Remember the limits: 100 entries per campaign, IPv4 only, and 203.0.113.* in place of a /24 block. Spurn does not change or read these entries.

Tracking template#

Microsoft calls a tracking template from the visitor's browser just as Google does, which lets Spurn record the IP even when the page never loads. Spurn does not set it in Microsoft for you. Copy it from Tracking template into your account-level settings.

When something goes wrong#

  • "Choose a UET tag". The account has more than one, or none Spurn can see. Pick the one on your site in the account's settings, or add the UET tag to your site first.
  • "Reconnect Microsoft Advertising". Microsoft stopped accepting Spurn's access. Reconnect as the same person to pick up where it left off.
  • A campaign is listed as refused. Microsoft would not attach the audience to that campaign type. The others are still covered.