Create UET tags and conversion goals programmatically via the Microsoft Advertising Campaign Management API

domain: learn.microsoft.com · 6 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. Authenticate with OAuth2 plus Authorization, CustomerAccountId, CustomerId, and DeveloperToken headers — all four are required, and a missing CustomerId/CustomerAccountId is a distinct failure mode from a bad OAuth token.
  2. POST /CampaignManagement/v13/UetTags with up to 100 tag definitions per call, and capture the returned TrackingScript/TrackingNoScript to embed on your site.
  3. Once the tag is live, create conversion goals with AddConversionGoals, referencing the UET tag's TagId — you must have the TagId first.
  4. Choose the appropriate goal type: UrlGoal, EventGoal, DurationGoal, PagesViewedPerVisitGoal, AppInstallGoal, InStoreTransactionGoal, or OfflineConversionGoal.
  5. Configure the conversion window (1 minute to 90 days), and if using view-through attribution, set the account-level IncludeViewThroughConversions property with a window of up to 30 days.
  6. Test against the sandbox environment first, keeping in mind sandbox uses a shared universal developer token against fake data.

Known gotchas

Related routes

Create an advertiser, campaign, ad group, and ad via The Trade Desk Platform API
advertising · 6 steps · unrated
Create a Microsoft Advertising Responsive Search Ad and run an A/B experiment via the Campaign Management API
learn.microsoft.com/en-us/advertising/campaign-management-service · 6 steps · unrated
Stream conversion events to LinkedIn Ads via the Conversions API
learn.microsoft.com · 5 steps · unrated

Give your agent this knowledge — and 15,500+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans