Microsoft Ads tracking template and UTM builder
Set the source and medium your Microsoft Advertising clicks should carry, tick URL parameters such as {Campaign}, {QueryString} or {MatchType}, and copy the result into the account. Because Microsoft can fill in campaign and ad group names, one suffix can cover every campaign you run.
Mapping: source and medium go in lowercase, hyphens for spaces. Names win over IDs for utm_campaign and utm_content, and the keyword wins over the search query for utm_term; the table below gives the full order. Leftovers such as {Network} become lowercase keys like network={Network}. In the preview, sample names and numbers replace what Microsoft would insert.
Microsoft Advertising reports what happened up to the click. Virling picks up from there and puts the payments that followed under the {Campaign} name each click carried. 14 days free.
Related: Microsoft Ads revenue tracking, Bing revenue tracking, msclkid vs UTM tags, Google Ads UTM builder.
Final URL suffix or tracking template
Microsoft Advertising sets limits on each field that are easy to trip over when you paste tags by hand:
| Final URL suffix | Tracking template | |
|---|---|---|
| What you enter | Parameters only, such as utm_source=bing | A whole URL with a parameter that inserts the final URL, such as {lpurl} |
| What it does | Adds the parameters to the end of the landing page URL | Builds the URL from the template, which can also go through a tracking service |
| What it cannot hold | ?, & or # at the start, or {lpurl} anywhere | More than 2,048 characters |
| If levels differ | The lowest level is used, levels are not combined | The lowest level overrides the ones above |
For UTM tags, use the suffix. Microsoft says parameters in it are always sent to the landing page. Use the template if a tracking service needs it, or if automatic UTM tagging is on for your account. Microsoft recommends putting {lpurl} at the beginning of the template, because elsewhere the final URL is escaped. A template without {lpurl} or a similar parameter breaks the landing page URL. Put the tags in only one of the two fields; Microsoft does not merge them for you.
Microsoft Advertising help, read on 2026-11-25: Using a final URL suffix, Create an account tracking template, What tracking or URL parameters can I use?. API reference: URL Tracking with Upgraded URLs, checked again on 2026-11-27.
Microsoft Advertising URL parameters, mapped to UTM tags
Microsoft writes its parameters in mixed case, and its help page What tracking or URL parameters can I use? (read on 2026-11-25) is where the first two columns come from. The UTM column is how this builder places them.
| Parameter | What it returns | UTM tag |
|---|---|---|
{Campaign} | The campaign name | utm_campaign |
{CampaignId} | The campaign ID | utm_campaign, if the name is off |
{AdGroup} | The ad group name | utm_content |
{AdGroupId} | The ad group ID | utm_content, if the ad group name is off |
{AdId} | The numeric ID of the ad | utm_content, if both ad group boxes are off |
{keyword:default} | The keyword that matched the search, with each space as %20 | utm_term |
{QueryString} | The search query the person entered | utm_term, if the keyword is off |
{TargetId} | The ID of the keyword, audience list, dynamic ad target, product partition or location that triggered the ad | utm_term, if the two above are off |
{OrderItemId} | The keyword ID, or the product group ID in Shopping campaigns | utm_term, if the three above are off |
{MatchType} | The match type used: e exact, p phrase, b broad | None, sent as matchtype |
{BidMatchType} | The match type you bid on: be, bp or bb | None, sent as bidmatchtype |
{Network} | o owned and operated search, s search partners, a audience placements | None, sent as network |
{Device} | m mobile, t tablet, c desktop or laptop | None, sent as device |
{loc_physical_ms} | The location code of the click | None, sent as loc_physical_ms |
Three of these answer questions the campaign name cannot. {QueryString} is what the person typed, while {keyword:default} is the keyword you bid on; they differ whenever a phrase or broad keyword catches a longer search, so tick Search query instead of Keyword if you want the real words in utm_term. {MatchType} then says whether the match was exact, phrase or broad, and {BidMatchType} what you bid on, so bidmatchtype=bb&matchtype=e is a broad keyword that met an exact search. {Network} separates Microsoft’s own search results (o) from search partners (s) and audience placements (a).
The word after the colon in {keyword:default} is the text Microsoft uses if the keyword would make the URL too long. The builder writes {keyword:none}, so a click that hits the limit shows as none. The help page only says that spaces in keywords are encoded, so prefer campaign and ad group names without spaces or symbols, or tick the IDs. For Performance Max, Microsoft has no asset group parameters and says to use {AdGroup} and {AdGroupId} for the asset group name and ID.
How automatic UTM tagging behaves
Microsoft Advertising can add UTM tags itself, separately from the msclkid. The setting is under Settings, Account level options, Auto-tagging of UTM. You choose to replace all existing tags, which removes yours and adds Microsoft’s, or to keep your tags and add the missing ones. The API docs describe three states, off, preserve and replace, and say a new account defaults to off if no state is set (AutoTagType and AdvertiserAccount).
The choice checks the UTM tags in the tracking template. Microsoft warns that tags you add by hand in the final URL or the suffix, combined with automatic tagging, can be duplicated in some circumstances. So pick one of these:
- Automatic tagging off. Paste the suffix. This is the simplest setup.
- Automatic tagging on, with keep. Paste the template instead, and test the result.
- Automatic tagging on, with replace. Your own tags are removed, so this builder will not help until you change the option.
Microsoft also lists a newer format that sets the tags by ad type, and notes that not everyone has it yet. The last column shows what the medium does in Virling:
| Ad type | Automatic tags | In Virling |
|---|---|---|
| Search | utm_source=bing, utm_medium=cpc | Paid |
| Audience ads | utm_source=msads, utm_medium=cpm | Not Paid, because cpm is not a paid medium |
| Shopping ads | utm_source=msads, utm_medium=cpc | Paid |
| Video | utm_source=bing_video, utm_medium=cpc | Paid |
| Performance Max | utm_source=msads, no medium listed | Not Paid, unless a paid medium arrives some other way |
A visit whose medium is not on the paid list is sorted by its referrer first, then by utm_source. Sources: Microsoft Advertising help, How do I add UTM tags to my landing page URL?; the API docs linked above, all read on 2026-11-25.
Campaigns imported from Google Ads
Import from Google Ads copies URL options along with the campaigns. Microsoft’s import options say the account-level tracking template and final URL suffix come across by default, and so do the tracking templates, custom parameters and final URL suffixes of each imported item. Updates to them are copied on later imports too, as long as updates to existing items are switched on (GoogleImportOption, read on 2026-11-27).
A suffix written for Google therefore arrives with utm_source=google, and Bing clicks show up under Google in every report. It also keeps Google’s ValueTrack names, and the two lists differ: Microsoft has {Campaign} for the campaign name, which Google lacks, and its {Network} returns o, s or a where Google’s returns letters such as g. Before the next import runs, fix it in one of two ways:
- Replace on import. Under Choose import options, the import can find and replace text in each tracking template and in final URL suffixes, so
utm_source=googlecan becomeutm_source=bingon the way in. - Stop copying URL options. Turn off account-level URL options and updates to URL options, then paste the suffix from this builder. Otherwise the next import with updates on can copy Google’s suffix back over yours.
Where to paste it in Microsoft Advertising
- For the whole account, hover over Campaigns in the left menu and select Settings, then Account level options. Paste into Final URL suffix or Tracking template and save.
- For one campaign, open the campaign, select Settings, and paste the suffix under Campaign URL options.
- Paste the suffix as it is, starting with
utm_source; Microsoft rejects a leading?. - A campaign suffix replaces the account one rather than adding to it, so copy over any tag you still need.
- Run Microsoft’s URL test tool, then click through once yourself. If your site redirects, say from http to https, the
utm_part must survive the hop.
Because {Campaign} fills in the name of each campaign, one suffix on the account can cover all of them. Microsoft recommends setting the template on the account too, so a change is made in one place. Steps from Using a final URL suffix and Create an account tracking template, read on 2026-11-25.
A worked example
The defaults produce utm_source=bing&utm_medium=cpc&utm_campaign={Campaign}&utm_content={AdGroup}&utm_term={keyword:none}, with no typed campaign name anywhere, and {lpurl}? in front of the same string as the template.
A click on an ad in the brand-search campaign, ad group pricing, keyword analytics, with https://example.com/pricing as the final URL, lands on https://example.com/pricing?utm_source=bing&utm_medium=cpc&utm_campaign=brand-search&utm_content=pricing&utm_term=analytics. Microsoft also appends an msclkid when click ID auto-tagging is on, the default for a new account (AccountProperty, read on 2026-11-25). You will not see one in the preview: Microsoft generates it per click.
What Virling reads from these tags
Of everything on the landing URL, Virling keeps the utm_ tags; the msclkid, matchtype, network and the rest stay with Microsoft and your other tools. A paid medium such as cpc puts the click in Paid, and without one a visit from bing.com falls under Organic search, or Direct if no referrer came with it (how channels are decided). Payments are then credited to the utm_campaign of the visit that led to them, so renaming a campaign starts a second row from the next click. Microsoft Ads revenue tracking shows how to go from the tag to the payment, and Bing revenue tracking covers the unpaid clicks.
Microsoft Ads tracking template FAQ
What should a Microsoft Ads tracking template for UTM tags look like?
Microsoft wants {lpurl} at the very start, since anywhere else the final URL is escaped. A working one is {lpurl}?utm_source=bing&utm_medium=cpc&utm_campaign={Campaign}, which stays under the 2,048 character limit with room to spare.
Should I use the final URL suffix or the tracking template?
The suffix, in most cases: Microsoft always passes its parameters on to the landing page. Use the template if a tracking service needs it, or if you keep automatic UTM tagging on, because Microsoft says the keep or replace choice checks the tracking template. Do not put the same tags in both.
Can Microsoft Ads fill in the campaign name by itself?
Yes. {Campaign} returns the name of the campaign and {AdGroup} the name of the ad group, so one suffix on the account can name every campaign. {CampaignId} and {AdGroupId} return the IDs instead.
Does automatic UTM tagging overwrite my own tags?
It depends on the option you pick. Replace removes the UTM tags you have and adds Microsoft's. Keep leaves yours and adds the ones that are missing. Microsoft warns that tags in the final URL or the suffix can be duplicated when automatic tagging is on.
Does importing from Google Ads copy my UTM tags?
Yes, by default. The import brings over the account-level tracking template and final URL suffix and those of each imported item, so a Google suffix arrives with utm_source=google. Use the import's find and replace for tracking templates and final URL suffixes, or turn off URL options in the import and paste a Microsoft suffix.
Does Virling read the msclkid?
No. The msclkid is for Microsoft’s own conversion tracking, so leave it on. Virling works from the UTM tags on the same click, which is why the suffix is still needed.
Put revenue next to every Microsoft Ads campaign
With {Campaign} in the suffix, every campaign in the account gets its own row in Virling, with the customers and revenue that came from its clicks. Try it on your own account for 14 days, free.