MMM Campaign Groups Table (BETA)
mmm_campaign_groups_table
The MMM Campaign Groups table maps ad campaigns to the modeled group used in a model run. One row per model run per campaign-group mapping. The mapping is a training-time snapshot.
Table GuideWhat You Can Answer With This Table
- Which campaigns are grouped into each modeled group for a model run? — use
group_name,campaign_name,channel- How much did each campaign spend in the last period before training? — use
campaign_name,spend_last_period,pct_cont_last_period- Which campaigns were active during the model window? — use
is_active,first_active_date,last_active_dateBefore You Query
- This table is not time-series, so no date filter is needed.
- Rows are training-time snapshots; the same campaign can map to different modeled groups across model runs.
Key Relationships
Table Join Key Use This Join To MMM Models model_idGet the model run's configuration and accuracy MMM Attributions model_id,group_idRoll campaigns up to their modeled group's attributed KPI and spend MMM Marginal Lifts model_id,group_idRoll campaigns up to their modeled group's marginal return MMM Reallocations model_id,group_idSee the budget scenario result for the modeled group a campaign belongs to Custom Categories category_id,sub_category_idCompare this model-run grouping snapshot with active category labels and rules Custom Category Mappings campaign_id,category_id,sub_category_id,channeltoprovider_idCompare this model-run grouping snapshot with live campaign-to-subcategory mappings When to Use a Different Table
- Use Custom Category Mappings when you need the live campaign-to-category/subcategory mapping outside MMM. MMM Campaign Groups stores the grouping snapshot captured for a specific model run.
- Use Custom Categories when you need the category and subcategory taxonomy definitions themselves. MMM Campaign Groups maps campaigns to modeled groups for a specific model run.
Dimensions
Dimensions are immutable properties that can be used for grouping data.
| Title | ID | Type | Description |
|---|---|---|---|
| Campaign ID | campaign_id | string | The unique identifier of the ad campaign, as assigned by its ad platform. Example value: |
| Campaign Name | campaign_name | string | The display name of the ad campaign. Example value: |
| Category ID | category_id | string | The Custom Categories category ID, which identifies the grouping dimension used to build the modeled groups (for example, Tactic, Geography, or Product). Example value: |
| Channel | channel | string | The campaign's raw platform or source, before it was assigned to a modeled group. Example values: |
| Campaign Group Created Date | created_at | timestamp | The time at which the campaign group row was written to the database. Formatted according to the ISO 8601 international standard. Example value: |
| First Active Date | first_active_date | date | The first date the campaign was seen as active in the model's data. Example value: |
| Group ID | group_id | string | The unique identifier of the modeled group the campaign was assigned to. When MMM uses Custom Categories, this corresponds to the subcategory ID used for model grouping. Joins to MMM Attributions, MMM Marginal Lifts, and MMM Reallocations. Example value: |
| Group Name | group_name | string | The display name of the modeled group the campaign was assigned to. When MMM uses Custom Categories, this is the subcategory name. Example values: |
| Is Active | is_active | boolean | True if the campaign was active in the period the model was trained on. Possible values: |
| Is Micro | is_micro | boolean | True if the campaign is a low-spend campaign folded into a shared micro-spend collective rather than modeled individually. Possible values: |
| Last Active Date | last_active_date | date | The last date the campaign was seen as active in the model's data. Example value: |
| Model ID | model_id | string | The unique identifier of the model run the mapping snapshot belongs to. Joins to MMM Models. Example value: |
| Settings ID | settings_id | string | The unique identifier of the model configuration. All runs of the same model share one Example value: |
| Subcategory ID | sub_category_id | string | The Custom Categories subcategory ID assigned to the campaign, when available from the campaign-group mapping. Example value: |
Measures
Measures are numeric fields that can be aggregated and/or combined to calculate new metrics.
| Title | ID | Type | Description |
|---|---|---|---|
| Contribution to Group (Last Period) | pct_cont_last_period | numeric | The campaign's share of its modeled group's spend in the most recent period, as a percentage. |
| Spend Last Period | spend_last_period | numeric | The campaign's spend in the most recent period before the model ran. By default shown in the shop's currency. |