Before creating MMM, we have to make sure what is the independent and dependent variables in this model. Because the management wants to know the impact of media channels on sales, so I took sales as the dependent variable and other factors, especially the media channels as the independent variables that have an impact on sales.
Dependent variable data collection
The dependent variable is sales from 2014 to 2017, so I first collected all of the sales data of three channels from our client: MAPE online transaction data, MAPE specialty store transaction data and Nilsen (Nilsen has most of the transaction data of non-specialty stores, when doing MMM our client bought the data from Nilsen and provided it to us).
I integrated all there sales data from different channels and this is the sales dataset brief:
- Dataset name: sales_raw_data
- 12253 rows, 20 columns
- It includes all the sales data from 2014-01-06 to 2017-12-31, below is the snapshot of this dataset:

Independent variable data collection
I considered three kinds of independent variables: baseline variables, incremental variables and others.
1. Baseline Variables.
The baseline is any impact achieved independent of marketing mix variables. Here I considered seasonality and Macro-economic factors. Seasonality factor can be shown directly in sales_raw_data dataset so I didn’t need to collect extra data from any other source. For Macro-economic variables, I just chose CCI. And I downloaded the USA CCI data between 2014 and 2017 from OECD, this is the snapshot:
As you can see, it’s monthly data. I save the dataset with the name cci_raw_data.
2. Incremental Variables.
Incremental variables can be broadly classified three categories:
ATL (Above-the-Line) marketing
Above-the-line advertising consists of advertising activities that are largely non-targeted and have a wide reach). Considering the condition of our company, I chose two offline media channels as the ATL variables: national tv, and magazine. National TV and magazine data was both bought from Nilsen. I named this dataset offline_raw_data. This is the TV and magazine GRP data from 2014-01-06 to 2017-12-31. Below is the snapshot:

And I also got the DMA data which is used to do some calculation when doing ETL. I call it dma_hh_raw_data dataset. Below is the snapshot:

BTL (Below-the-Line) marketing
Below-the-line advertising consists of very specific, memorable and direct advertising activities focused on targeted groups of consumers. According to the marketing plan of our client in the past four years, I chose “sales event” as the BTL variable. It’s in-house data of our client. It’s the sales event information from 2014-01-06 to 2017-12-31, if the value is 1, there was sales event on that day, if it’s 0, there wasn’t. It’s so simple and I won’t show the snapshot here. I call this dataset as sales_event_raw_data.
TTL (Through-the-Line) marketing
Through-the-Line advertising involves the use of both ATL & BTL marketing strategies. I chose four online media channels as the TTL variables according to our digital marketing plan in the past four years: Facebook, WeChat, Paid Search and Display. All of this data was from third_party which does the tracking work for the ads. And all of these data is weekly data.
fb_raw_data

display_raw_data

wechat_raw_data

paidsearch_raw_data

3. Other Variables.
For other variables, I just considered competitor media spend from 2014-01-06 to 2017-12-31 here. This data is bought from Kantar. This is the snapshot:

As you can see, it’s weekly data. I named this dataset as comp_media_spend_raw_data.
Marketing spend data collection
In order to do spend optimization based on ROI, we need to get the marketing spend of the past four years and an estimated makreting budget allocation for the next year. I won’t show the snapshot of the spend data here. I got the spend data from our client.
Summary
In this phase, I’d already collected all the data that I need to build MMM and do spend optimization for the next year. Some of them is day data, some is weekly data and some is monthly data. In MMM, we usually use weekly data so I transformed all the data collected into weekly data in ETL process and an uniform format for later analysis. The next post is about ETL process.