Unveiling the Power of Meta GeoLift: A Guide to GeoLift Experiments in Marketing

In the dynamic landscape of digital marketing, understanding the real impact of geo-targeted campaigns is key. Enter Meta GeoLift, a game-changer in marketing measurement. In this post, we’ll delve into what GeoLift experiments are, why they’re a must for marketers, and a step-by-step guide on running Meta GeoLift

What are GeoLift Experiments?
GeoLift experiments are a way to measure the effectiveness of marketing efforts in specific geographic locations. Unlike traditional metrics, GeoLift focuses on the incremental impact, answering the crucial question: Did our campaign make a real difference in these specific regions?

Why Use Meta GeoLift for Marketing Measurement?

  • Precision in Geo-Targeting: GeoLift experiments allow marketers to fine-tune their targeting. Instead of a broad brush, you can pinpoint regions where your campaigns truly matter.
  • Optimizing Ad Spend: By understanding the lift in specific locations, marketers can optimize their ad spend. Why invest where there’s minimal impact when you can channel resources where they make a real difference?
  • Data-Driven Decision Making: GeoLift experiments provide actionable insights backed by data. Make decisions based on what’s working, not just what seems to be working.

How to Run Meta GeoLift: A Step-by-Step Guide

Define Experiment Goals

Clearly outline what you aim to achieve with your GeoLift experiment. Are you looking to boost click-through rates, increase conversions, or enhance brand engagement?


Data and R Environment

Set-up of the R Environment:

Ensure you have the required packages installed.

install.packages("remotes", repos='http://cran.us.r-project.org')
remotes::install_github("ebenmichael/augsynth")
remotes::install_github("facebookincubator/GeoLift")
library(GeoLift)

Data

Showcasing GeoLift Implementation with Simulated Data:

For this illustration, we’ll use simulated data for 40 US cities over 90 days. This data will help us design a test, select test markets, run power calculations, and ultimately calculate the lift caused by a campaign.

# Load simulated data from GeoLift package
data(GeoLift_PreTest)

# Analyze and format the data using GeoDataRead function
GeoTestData_PreTest <- GeoDataRead(data = GeoLift_PreTest,
                                    date_id = "date",
                                    location_id = "location",
                                    Y_id = "Y",
                                    X = c(), # Empty list as we have no covariates
                                    format = "yyyy-mm-dd",
                                    summary = TRUE)

# Display a summary of the formatted data
head(GeoTestData_PreTest)

The GeoDataRead function processes the data, ensuring completeness and returning a data frame with time-stamps. In this case, each time unit represents a day.

Note: Ensure there are no missing variables, NAs, or locations with missing time-stamps before using GeoDataRead().

Data Analysis

Plotting Panel Data with GeoPlot:

Visualize the data trends, contributions per location, and detect anomalies using GeoPlot.

GeoPlot(GeoTestData_PreTest,
        Y_id = "Y",
        time_id = "time",
        location_id = "location")

This plot provides insights into the shared patterns across locations, crucial for a successful GeoLift test.

Christos Visvardis image-13 Unveiling the Power of Meta GeoLift: A Guide to GeoLift Experiments in Marketing

Power analysis

Certainly! Let’s dive into the power analysis section using the specific code you provided:

MarketSelections <- GeoLiftMarketSelection(data = GeoTestData_PreTest,
                                           treatment_periods = c(10,15),
                                           N = c(2,3,4,5),
                                           Y_id = "Y",
                                           location_id = "location",
                                           time_id = "time",
                                           effect_size = seq(0, 0.5, 0.05),
                                           lookback_window = 1,
                                           include_markets = c("chicago"),
                                           exclude_markets = c("honolulu"),
                                           holdout = c(0.5, 1),
                                           cpic = 7.50,
                                           budget = 100000,
                                           alpha = 0.1,
                                           Correlations = TRUE,
                                           fixed_effects = TRUE,
                                           side_of_test = "two_sided")
  1. Data: You’re using the GeoTestData_PreTest dataset for your analysis. Ensure it contains the necessary columns like “location,” “Y” for outcome data, and “time” for time periods.
  2. Test Durations: Assessing the power for 10 and 15-day tests.
  3. Test Market Sizes: Exploring different test market sizes – 2, 3, 4, and 5 markets.
  4. Effect Size: Simulating lifts from 0% to 50% in 5% increments. This defines the minimum lift needed for a successful test.
  5. Lookback Window: Focusing on the most recent possible test by setting it to 1.
  6. Include and Exclude Markets: Chicago is a must in the test group (include_markets), and Honolulu is excluded from the test group.
  7. Holdout: Allowing a large holdout, set at 50% to 100%, indicating the share of conversions that won’t see the ad campaign.
  8. CPIC (Cost Per Incremental Conversion): Set at $7.50, providing an estimate of the average cost needed to bring one incremental conversion.
  9. Budget: The maximum budget available for the GeoLift test is set at $100,000.
  10. Alpha: Significance level is set at 0.1 (90% confidence level) by default.
  11. Correlations: Including correlations between test regions and control markets in the output.
  12. Fixed Effects: Including unit Fixed Effects in the model, given the stable behavior observed in historical data.
  13. Side of Test: Using a two-sided test for determining confidence.

The GeoLiftMarketSelection function returns a variable named MarketSelections, containing key metrics like Power, AvgScaledL2Imbalance, Investment, AvgATT, Average_MDE, and more. These metrics help you evaluate and select the best combination of test markets based on your criteria and goals.

Running the test

Test Data Preparation

Test Data Source: The data for the campaign results is stored in the GeoLift_Test dataset.

Reading Data:

   GeoTestData_Test <- GeoDataRead(data = GeoLift_Test,
                                   date_id = "date",
                                   location_id = "location",
                                   Y_id = "Y",
                                   X = c(), #empty list as we have no covariates
                                   format = "yyyy-mm-dd",
                                   summary = TRUE)
  • Using the GeoDataRead function to read the test data into GeoLift’s format.
  • The summary output provides information about the data, including the number of locations and time periods.

Displaying Test Data:

   head(GeoTestData_Test)
  • Displaying the first few rows of the test data, showing columns for location, time, and the outcome variable Y.

Visualization of Test Results:

Plotting Test Results:

   GeoPlot(GeoTestData_Test,
           Y_id = "Y",
           time_id = "time",
           location_id = "location",
           treatment_start = 91)
  • Using GeoPlot to visualize the time-series data for post-campaign results.
  • The treatment_start parameter is set to 91, indicating the time stamp at which the campaign started.
Christos Visvardis image-10 Unveiling the Power of Meta GeoLift: A Guide to GeoLift Experiments in Marketing

GeoLift Inference:

Running GeoLift:

   GeoTest <- GeoLift(Y_id = "Y",
                     data = GeoTestData_Test,
                     locations = c("chicago", "portland"),
                     treatment_start_time = 91,
                     treatment_end_time = 105)
  • Applying the GeoLift function to calculate the actual lift caused by the marketing campaigns.
  • Specifying test parameters such as outcome variable, data, treatment locations, and treatment time period.

Displaying GeoLift Results:

   GeoTest
  • Displaying the results of the GeoLift analysis, showing the percent lift, incremental Y, average estimated treatment effect (ATT), and statistical significance.
    #> One outcome and one treatment time found. Running single_augsynth.
    #>
    #> GeoLift Output
    #>
    #> Test results for 15 treatment periods, from time-stamp 91 to 105 for test markets:
    #> 1 CHICAGO
    #> 2 PORTLAND
    #> ##################################
    #> #####     Test Statistics    #####
    #> ##################################
    #>
    #> Percent Lift: 5.4%
    #>
    #> Incremental Y: 4667
    #>
    #> Average Estimated Treatment Effect (ATT): 155.556
    #>
    #> The results are significant at a 95% level. (TOTAL)
    #>
    #> There is a 0.6% chance of observing an effect this large or larger assuming treatment effect is zero.

Summary and Model Fit:

Summary of GeoLift Results:

   summary(GeoTest)
  • Providing a detailed summary of GeoLift results, including average ATT, percent lift, incremental Y, p-value, balance statistics, and model weights.
    #>
    #> GeoLift Results Summary
    #> ##################################
    #> #####     Test Statistics    #####
    #> ##################################
    #>
    #> * Average ATT: 155.556
    #> * Percent Lift: 5.4%
    #> * Incremental Y: 4667
    #> * P-value: 0.01
    #>
    #> ##################################
    #> #####   Balance Statistics   #####
    #> ##################################
    #>
    #> * L2 Imbalance: 909.489
    #> * Scaled L2 Imbalance: 0.1636
    #> * Percent improvement from naive model: 83.64%
    #> * Average Estimated Bias: NA
    #>
    #> ##################################
    #> #####     Model Weights      #####
    #> ##################################
    #>
    #> * Prognostic Function: NONE
    #>
    #> * Model Weights:
    #>  * austin: 0.0465
    #>  * baton rouge: 0.1335
    #>  * cincinnati: 0.2272
    #>  * dallas: 0.0739
    #>  * honolulu: 0.0673
    #>  * houston: 0.0046
    #>  * miami: 0.2028
    #>  * minneapolis: 0.09
    #>  * nashville: 0.0685
    #>  * new york: 0.0046
    #>  * reno: 0.0306
    #>  * san antonio: 0.0054
    #>  * san diego: 0.0451

Plotting Lift and ATT:

   plot(GeoTest, type = "Lift")
   plot(GeoTest, type = "ATT")
  • Using the plot function to visualize the lift and average treatment effect over time.
  • The charts help assess the model’s fit and the effectiveness of the marketing campaign.
Christos Visvardis image-11 Unveiling the Power of Meta GeoLift: A Guide to GeoLift Experiments in Marketing
Christos Visvardis image-12 Unveiling the Power of Meta GeoLift: A Guide to GeoLift Experiments in Marketing


Meta GeoLift opens the door to a new era of precision in marketing. By running GeoLift experiments, marketers can elevate their strategies, ensuring every ad dollar spent contributes significantly to the bottom line. Ready to unlock the geo-marketing potential? Dive into Meta GeoLift and watch your campaigns soar.