Analytics Accelerator Case Study

Social Media Users Are Lovin’ It: How Causal Impact Models Help Inform Engagement


McDonald’s, the world’s largest restaurant chain by revenue, sought to examine how they could best utilize social media activities to drive sales, boost engagement, and create positive brand sentiment. To that end, they partnered with the Analytics Accelerator at Wharton AI & Analytics for Business. A team of Wharton students successfully distilled the overall aim of the project into three objectives:

  • Determine the impact of – and differences between – organic social media activity and paid social activity, and discover how best to optimize organic social media strategies to maximize sales
  • Identify the primary drivers of social media engagement and optimize posts to encourage it
  • Establish a metric for brand affinity and determine what drives brand affinity


Objective 1: Sales

To determine the impact of organic (unpaid) social media activities on sales, students experimented with a variety of regression and time-based models, ultimately settling with a time-based approach. After identifying significant predictors, they created metrics to analyze several attributes, including the length of each post, media type (picture, video, etc.), and product associations to determine their impact on sales. To measure the incremental impact of campaign (paid) social media activities, the team utilized a causal impact model based on Bayesian Structural Time Series (BSTS). The model worked to examine whether an intervention (the paid campaign) had a statistically significant impact on a target variable (total sale amount).

Objective 2: Engagement

To determine how to optimize McDonald’s posts for social media engagement, the student team tackled two items. They first had to develop a metric that truly measures the level of engagement on a given post. Secondly, they had to identify the conditions (a post’s content, timing, etc.) under which they could best examine the metric.

Objective 3: Brand Affinity

To define the metric for brand affinity, the team utilized a three-step approach: brand affinity definition and metric selection, metric creation, and implementation of the composite brand affinity metric. Once they defined these elements, they conducted various analyzes to uncover trends.

Key Takeaways

Objective 1: Sales

From their modeling, students discovered that a given social media post’s reach, number of likes/reactions, and number of negative comments all impacted sales in a statistically significant way. Specifically, a post’s reach and its number of likes/reactions positively correlate to sales.

When controlling for time periods, the team also discovered that most paid campaigns resulted in a significant, positive increase of sales for the associated products. For instances in which product-specific data was not available, students found that certain paid campaigns can result in a significant increase in total sales as well.

Objective 2: Engagement

The Analytics Accelerator team was able to uncover a number of valuable insights regarding McDonald’s social media engagement:

  • Posts with interactive media types, such as videos and carousels, outperform posts with stationary media types, like images and text
  • Posts with clear and explicit products, like Big Mac, have higher engagement rates
  • Twitter users more often engage with tweets that contain fewer than 100 characters
  • Posts containing a cultural or celebrity-related keyword have a higher engagement rate
  • Typically, Facebook posts receive “deeper” levels of engagement than posts on other social media channels

Objective 3: Brand Affinity

Regarding brand affinity, students were able to determine the following:

  • Brand affinity is highly contextual and content-specific
  • Product association plays a large role
  • Different social media platforms impact brand affinity
  • Using prompts helps to drive engagement and affinity


To increase sales, the team recommend the following to McDonald’s:

  • Increase the frequency of short posts (fewer than 64 characters)
  • Prioritize posts with distinct product associations, as they perform better
  • Although posts with video perform better on average, photos show potential, and should be experimented with
  • Instagram, posts with cultural associations, and posts with celebrity mentions should all be boosted and prioritized
  • Brand social posts appear to be underutilized

In terms of brand affinity, the team believes that posts should have a clear product association as much as possible. They also suggest experimenting to test promising areas which have a small sample size, and to continue tweaking the brand affinity metric. It may be helpful to identify causal links of the brand affinity elements with sales, satisfaction scores, or other target metrics.

About the Analytics Accelerator

Every fall and spring semester, Analytics at Wharton hosts the Analytics Accelerator, an experiential learning program that pairs students with a company to solve a real-world business problem using the company’s actual datasets and the latest techniques including machine learning and AI.

Learn More