Growth Strategies for Targeted Advertising
Objective: Identify high-potential audience segments to optimize advertising campaigns and predict sales.
1. What was our starting point?
The initial goal of this analysis was to mine our Google Ads and Google Analytics data to build a more targeted advertising strategy based on reliable sales predictions. The central question that guided my work was:“Which audience segments have the highest conversion potential?”
2. How did I transform raw data into a reliable basis for analysis?
My first challenge was working with raw, heterogeneous, and "dirty" data. To ensure the reliability of the analysis, I followed a rigorous multi-step methodology on BigQuery and R.
Cleaning and Standardization:I first duplicated the tables to preserve the originals. Then, I removed duplicates, standardized the formats for dates, texts (e.g., "google/cpc" and "Google/CPC" were unified), and numbers (removing currency symbols like '$' to make them computable). I used functions like SAFE.PARSE_DATE for dates and REGEXP_REPLACE for numbers, chosen for their robustness in handling multiple formats without generating errors.
Creating a Flat Table:To simplify the analysis, I joined the acquisition and transaction tables into a single flat table. I used a JOIN to ensure I retained all sessions, including those that didn't result in a sale, which is crucial for calculating accurate conversion rates.
3. What did we discover during the exploration?
The descriptive analysis, conducted with the ggplot2 library on R for its advanced visualization capabilities, quickly revealed very clear trends by answering three simple questions.
Where does performance lie?
The "Electronics" category overwhelmingly dominates revenue, far ahead of all others. I used the reorder() function in ggplot2 to sort the bars and make this hierarchy immediately visible.