ETLMCPData Conveyance Works
Log in Start free
Glossary

Account, campaign, ad group and ad IDs and names

What etlmcp puts in its eight ID and name columns for each platform, from Meta ad sets to LinkedIn creatives and GA4 session campaigns.

Every row etlmcp delivers carries the same eight identity columns, in this order after date and network: account_id, account_name, campaign_id, campaign_name, adgroup_id, adgroup_name, ad_id and ad_name. The IDs are each platform's own native IDs, written as text, so you can match them to what you see in the platform's interface or API. The column names are fixed, but what fills them depends on the platform: Meta's ad set goes into the ad group columns, a LinkedIn creative goes into the ad columns, and a GA4 session campaign goes into the campaign columns. A level a platform does not have is left empty.

How each platform maps onto the columns

The table shows what each connector puts in the four levels, when that connector is available.

Platform account campaign ad group ad
Google Ads customer (account) campaign ad group ad
Meta ad account campaign ad set ad
Microsoft Advertising account campaign ad group ad
LinkedIn ad account campaign group campaign creative
TikTok advertiser campaign ad group ad
Pinterest ad account campaign ad group ad
Snapchat ad account campaign ad squad ad
GA4 property session campaign session source / medium empty
Shopify store empty empty empty
demo (mock) demo account demo campaign empty empty

LinkedIn shifts one level down. LinkedIn's own hierarchy has three levels under the ad account: a campaign group holds related campaigns, each campaign names its group, and each creative names the campaign it belongs to. etlmcp reads LinkedIn's report by creative, then looks up each creative's campaign and that campaign's group. It writes the campaign group into campaign_id and campaign_name, the LinkedIn campaign into adgroup_id and adgroup_name, and the creative into ad_id and ad_name. LinkedIn's creative name is optional, and a creative without one gets its ID as its ad_name. A campaign or campaign group without a name is named by its ID in the same way. A creative etlmcp cannot look up keeps its figures and its ID, with empty parent columns.

GA4 is not an ad platform. Google's Data API describes sessionCampaignId and sessionCampaignName as the marketing campaign of a session, Google Ads campaigns and manual campaigns included. etlmcp asks for those two dimensions plus sessionSourceMedium and the date. campaign_id holds the session campaign ID, or the campaign name when GA4 reports no ID ((not set) or blank). campaign_name holds the name, (not set) when GA4 gives none. adgroup_id and adgroup_name both hold the source / medium pair, such as google / cpc. ad_id and ad_name are empty. The account columns hold the property's ID and its display name. For working with these rows in SQL, see GA4 rows in the canonical columns.

Account IDs

  • Google Ads: Google describes the customer ID as a unique number given to each account. etlmcp stores it as digits only, with any hyphens or spaces removed, so 123-456-7890 arrives as 1234567890.
  • Meta: the bare account number, without an act_ prefix.
  • LinkedIn: the number from the sponsored account URN, not the whole URN. The same goes for campaign, campaign group and creative IDs.
  • GA4: the property ID. Shopify: the store's myshopify.com domain, with the store name as account_name.

Ad names a platform does not give

When a platform gives an ad no name, etlmcp builds one:

  • Google Ads: an ad with no name is labelled with its type and ID, for example Responsive search ad 333.
  • Microsoft Advertising: ad_name is the ad title from the report, else its title parts joined with |, else the headline.
  • Pinterest: the report's AD_NAME, or its PIN_PROMOTION_NAME when AD_NAME is empty.

Rows with empty levels

Some connectors add rows above the ad level. Google Ads and Microsoft Advertising add a campaign-level row for spend the ad rows do not account for; on that row adgroup_id, adgroup_name, ad_id and ad_name are empty. Shopify rows have no campaign at all. If you count distinct ads or join on ad_id, filter out empty values first.

How the columns behave in storage

  • Always text. All four ID columns are written as strings, and PostgreSQL creates them as text columns. Keep them as text in your models and compare them as strings, for example campaign_id = '1234567890'.
  • The row key. Within one source, a day's row is identified by the date plus the four IDs. Names are not part of the key, so a renamed campaign does not create a second row.
  • Names as of the last sync of that day. A sync replaces every stored day in its date range, names included. If a platform reports a new name, days that are pulled again take it, and older days keep the name they were stored with. Group by ID, not by name, when a campaign may have been renamed.
  • Snapchat keeps known names. etlmcp reads Snapchat's figures by ad ID, then looks up names in the ad, ad squad and campaign listings, deleted ones included. When an entity can no longer be read, the row keeps the parents and names already stored for that ad instead of turning blank. See Snapchat deleted ads and names.

To see which platform a row came from, read the network column. For the full column list of a connector, see its reference page, such as the LinkedIn connector or the GA4 connector.

Related

Sources

  1. Create and Manage Campaign Groups - LinkedIn — learn.microsoft.com, checked
  2. Create and Manage LinkedIn Campaigns - LinkedIn — learn.microsoft.com, checked
  3. Create and Manage Creatives - LinkedIn — learn.microsoft.com, checked
  4. The dimensions and metrics you can use in Data API — developers.google.com, checked
  5. Marketing API overview — developers.facebook.com, checked
  6. Customer ID: Definition - Google Ads Help — support.google.com, checked