ETLMCPData Conveyance Works
Log in Start free
Glossary

extra.campaign_type (Microsoft)

What the Microsoft Advertising column extra.campaign_type holds, which values to expect, and how to use it to split spend by campaign type.

Coming This connector is coming.

extra.campaign_type is a text column on Microsoft Advertising rows that names the type of the campaign a row belongs to: a Microsoft Advertising campaign type such as Search, Shopping, Audience or Performance Max. Every row etlmcp delivers for Microsoft Advertising carries it whenever Microsoft fills it in, both the rows for single ads and the campaign-level rows. You use it to split spend, clicks and conversions by kind of campaign without keeping a separate list of which campaign is which.

What Microsoft puts in the column

The value comes from the CampaignType column of Microsoft's performance reports. Microsoft's reference for the campaign performance report describes it as the campaign type and lists these possible values, without claiming the list is complete:

Value in the report Kind of campaign
Search & content a Search campaign
Shopping a Microsoft Shopping campaign
Audience an Audience campaign
Performance max a Performance Max campaign
Dynamic search a Dynamic Search Ads campaign

The ad performance report's reference gives the same description but lists only four of these, leaving out Performance max.

The reports spell the types differently from Microsoft's Campaign Management API. That API's CampaignType value set uses single words without spaces: Search, Shopping, DynamicSearchAds, Audience, Hotel, PerformanceMax, App and ObjectiveBased. The same reference says Dynamic Search Ads is no longer offered as a campaign type of its own; those ads are now built in a dedicated kind of ad group inside a Search campaign. If you match campaign types between the two sources, map the spellings by hand.

How etlmcp fills it

Each Microsoft sync asks for two daily reports for every stretch of days: the ad performance report and the campaign performance report. Both requests include CampaignType, so ad rows and campaign-level rows alike can carry it. etlmcp trims spaces from the start and end of the value and otherwise keeps Microsoft's wording and capitals, with no relabelling. If Microsoft sends an empty value, the key is left out of the row's extras, and you see an empty cell in a file or NULL in a table.

When the ad rows for a campaign and day add up to less than the campaign report, etlmcp adds a campaign-level row for the difference, and that row keeps the campaign type too. See campaign-level remainder rows for when those rows appear. Because the column is on both kinds of row, a breakdown by campaign type adds up to the same daily total as the table itself, as long as Microsoft fills in the value.

etlmcp has no catalogue entry that makes this column a number, so destinations always deliver it as text. In a CSV file it is a column named extra.campaign_type; in PostgreSQL the column keeps the dot in its name, so write it in double quotes: "extra.campaign_type".

Using the column

  • Spend by campaign type: sum cost grouped by extra.campaign_type and date. No join is needed, since every row has its own value.
  • One type only: filter on the exact report spelling, for example Shopping or Performance max. In PostgreSQL the = match is case-sensitive.
  • In a transform: a group rule can use extra.campaign_type as one of its by keys. If the column is not a key, it is dropped from the grouped rows, because a group only combines numeric extras.
  • Through MCP: query_data accepts extra.campaign_type as a field name, so an agent can ask for it next to the metrics.

For the full list of what a Microsoft Advertising sync delivers, see the Microsoft Advertising connector, how a Microsoft sync works and which report types etlmcp uses. For the matching Google Ads columns, see extra.ad_type and extra.channel_type.

Related

Sources

  1. CampaignPerformanceReportColumn Value Set - Reporting - Microsoft Advertising API — learn.microsoft.com, checked
  2. AdPerformanceReportColumn Value Set - Reporting - Microsoft Advertising API — learn.microsoft.com, checked
  3. CampaignType Value Set - Campaign Management - Microsoft Advertising API — learn.microsoft.com, checked