Analyze an eCommerce A/B Test

Run SQL analytics on campaign data and publish a Tableau dashboard.

Introduction

30 Second Summary

Every online store runs experiments. They change a headline, swap an image, or try a new ad strategy, then watch the numbers to see if the change helped or hurt. The hard part is never collecting the data. It is turning that data into a confident recommendation that someone else can act on.

In this project, you will analyze two competing digital marketing campaigns using SQL to calculate key performance metrics, then build a live Tableau dashboard that tells the story to a non-technical audience.

What You'll Build

You will open a Tableau Public URL, hand it to a hiring manager, and walk them through exactly which campaign won, where it won, and what the business should do next.

By the end of this project, you'll have:

  • A complete SQL analysis that pinpoints exactly where the Test Campaign outperforms Control (clicks and intent) and where it falls short (final purchases).
  • A published Tableau Public dashboard with an interactive funnel visualization showing impressions through purchase for both campaigns, shareable as a single portfolio URL.
  • A written executive recommendation that translates your KPI findings into a clear go/no-go decision backed by specific numbers.
  • Secret Mission: Add a daily trend analysis showing how campaign performance shifted over the 30-day test period.

Are there any prerequisites?

You should be comfortable writing basic SQL queries (SELECT, WHERE, GROUP BY). Familiarity with spreadsheet tools like Excel or Google Sheets is helpful but not required.

Before We Start

Before diving into SQL queries and dashboards, let's lock in the business question you're solving and why the answer matters to stakeholders.

Set Up Your Analytics Environment

To analyze campaign data with SQL and present your findings visually, you need two core tools. A SQL engine lets you query raw CSV files directly. A visualization tool transforms those query results into an interactive dashboard you can share.

In this step, you will install DuckDB (a lightweight SQL engine that reads CSVs without any server setup), Tableau Desktop Public Edition (a free visualization tool), and download the A/B test dataset from Kaggle.

In this step, get ready to:
  • Install DuckDB CLI for running SQL queries against CSV files.
  • Install Tableau Desktop Public Edition for building shareable dashboards.
  • Download and organize the A/B test dataset.
Install DuckDB CLI

DuckDB is an in-process analytical database that can query CSV files directly with standard SQL. There is no server to configure or start. You install the CLI, point it at a file, and write queries.

  • Press the Windows key to open your search bar.
  • Type PowerShell and press Enter to open it.
  • Install DuckDB by running this command:
winget install DuckDB.cli

What does this command do?

The winget package manager downloads and installs the DuckDB command-line interface. It automatically adds the binary to your system so you can run duckdb from any terminal window.

  • Wait for the installation to complete. You will see a success message in PowerShell.
  • Close your PowerShell window completely.
  • Reopen PowerShell by pressing the Windows key, typing PowerShell, and pressing Enter.
  • Verify DuckDB is installed by running:
duckdb --version

✔️ I see a version number

You should see v1.5.5 (or your installed version) printed. DuckDB is ready to go.

ⓧ Command not found

If PowerShell does not recognize duckdb, the most common cause is that you did not close and reopen your terminal after installing. The system PATH only refreshes when you start a new terminal session.

  • Close PowerShell completely and reopen it.
  • Run duckdb --version again.
  • If it still fails, you may be missing the Microsoft Visual C++ Redistributable. Download and install it from the Microsoft website, then try again.

Still stuck? Help me troubleshoot why duckdb --version is not working on Windows after running winget install DuckDB.cli.

Install Tableau Desktop Public Edition

Tableau Desktop Public Edition is a free data visualization tool that lets you build interactive dashboards and publish them to the web. You will need a Tableau.com account to publish your finished dashboard later.

  • Open your web browser and go to the Tableau Public download page:
https://public.tableau.com/en-us/s/download
  • Fill out the registration form with your email address to create your free Tableau.com account.
  • Click DOWNLOAD THE APP on the form.
  • Once the download finishes, run the installer .exe file.
  • On the Welcome screen, accept the licensing agreement.
  • Click Install and wait for the installation to finish.

Why Tableau Public Edition?

Tableau Desktop Public Edition is free and does not require a license key. It connects directly to CSV files and lets you publish dashboards to a public URL that anyone can view and interact with.

Everything you publish via Tableau Public is publicly visible. This makes it perfect for portfolio pieces that hiring managers can access instantly.

  • After installation completes, open Tableau Public. Press the Windows key, type Tableau Public, and press Enter.

You should see the Tableau Start screen with options to connect to data sources on the left side.

Tableau not opening?

  • Make sure the installation fully completed before trying to open it. Look for a confirmation message or notification.
  • Try searching for Tableau Desktop Public Edition in your Start menu if Tableau Public does not show results.

Help me troubleshoot why Tableau Desktop Public Edition is not opening after installation on Windows.

Download the A/B test dataset

The dataset you will analyze contains daily marketing performance data for two campaigns: a Control Campaign and a Test Campaign. Each CSV has 30 rows representing 30 days of data.

  • Go to https://www.kaggle.com and create a free account if you do not already have one.
  • Navigate to the dataset page:
https://www.kaggle.com/datasets/amirmotefaker/ab-testing-dataset
  • Click Download on the dataset page to get the ZIP file.
  • Create your project folder by opening PowerShell and running:
mkdir C:\ab-test-project
  • Extract the downloaded ZIP file.
  • Move control_group.csv and test_group.csv into C:\ab-test-project\.
  • Confirm both files are in place by running:
dir C:\ab-test-project

You should see control_group.csv and test_group.csv listed in the output.

Only see one file or no files?

  • Some ZIP extractors create a nested folder inside the extraction. Check one level deeper in the extracted folder for the CSV files.
  • Make sure you moved the files to C:\ab-test-project\ and not a subfolder within it.

Help me find and move my downloaded Kaggle CSV files to the correct project folder on Windows.

What is in this dataset?

Each CSV contains daily data for one campaign over 30 days. The columns include Campaign Name, Date, Spend [USD], # of Impressions, Reach, # of Website Clicks, # of Searches, # of View Content, # of Add to Cart, and # of Purchase.

Together these columns represent the full marketing funnel from ad spend through to final purchase. You will use SQL to calculate rates at each funnel stage.

Your analytics environment is ready. Next up, you will load these CSV files into DuckDB and explore the raw data with SQL queries.

Load and Explore the Data with SQL

Your analytics environment is ready. Now it is time to meet the data.

Before you can calculate any KPIs, you need to understand what you are working with. Loading the CSVs into DuckDB and running exploratory queries reveals the data structure, surfaces any NULLs or anomalies, and gives you the raw numbers you will build metrics from.

In this step, get ready to:
  • Load both CSVs into a unified DuckDB table with a campaign identifier column.
  • Check for data quality issues like NULLs and verify the date range.
  • Examine raw funnel numbers per campaign to see the high-level picture.
Launch DuckDB and load both CSVs into a unified table

The two Kaggle CSVs sit in separate files with identical column structures. You need them combined into a single table so every query can compare both campaigns side by side.

  • Open your terminal and navigate to your project folder by running this command:
cd C:\ab-test-project
  • Launch DuckDB and create a new database file by running:
duckdb ab_test.duckdb

You should see the DuckDB prompt appear (a green D on Windows). This means you are inside the interactive SQL shell connected to ab_test.duckdb.

What is DuckDB's interactive mode?

DuckDB runs as an in-process analytical database. When you pass a filename like ab_test.duckdb, it creates (or opens) a persistent database file on disk. Every table you create is saved there automatically.

  • Create a combined table that stacks both CSVs together by running this SQL:
-- Load and combine both CSVs into a single table
CREATE TABLE campaign_data AS
SELECT *, 'Control' AS campaign_group
FROM read_csv_auto('control_group.csv')
UNION ALL
SELECT *, 'Test' AS campaign_group
FROM read_csv_auto('test_group.csv');

What does this query do?

read_csv_auto('control_group.csv') tells DuckDB to read the CSV and automatically detect column types. The 'Control' AS campaign_group adds a new column labelling every row from that file as Control.

UNION ALL stacks the test CSV underneath, labelled as Test. The result is one table with 60 rows (30 per campaign) and a campaign_group column to tell them apart.

Before you run the next query, how many total rows do you expect the table to contain?

  • Confirm the table was created correctly by running:
-- Check row count
SELECT COUNT(*) FROM campaign_data;

You should see 60 returned. That confirms 30 rows from each CSV loaded successfully.

Seeing 0 rows or an error?

If you see a file-not-found error, make sure you ran cd C:\ab-test-project before launching DuckDB. DuckDB resolves relative file paths from the directory where you started it.

If you see fewer than 60 rows, confirm both control_group.csv and test_group.csv are in the same folder. Help me troubleshoot my DuckDB CSV loading error.

Run exploratory queries to check data quality

The table exists, but you do not yet know if the data is clean. A few quick queries will reveal NULLs, confirm the date range, and show spend totals per group.

  • Check whether any rows are missing purchase data by running:
-- Check for NULLs in purchase column
SELECT * FROM campaign_data WHERE "# of Purchase" IS NULL;

If any rows appear, those days had no recorded purchases. Note how many you see.

Why check for NULLs first?

NULL values in a SUM or division silently distort your KPIs. Catching them now means you can decide how to handle them (exclude, replace with zero, or flag) before calculating rates.

  • Confirm the date range of the experiment by running:
-- Date range
SELECT MIN("Date"), MAX("Date") FROM campaign_data;

You should see a 30-day window, confirming both campaigns ran for the same period.

  • View spending totals per campaign group by running:
-- Totals per group
SELECT
    campaign_group,
    COUNT(*) AS days,
    SUM("Spend [USD]") AS total_spend
FROM campaign_data
GROUP BY campaign_group;

What should I see?

Two rows appear: one for Control and one for Test. Each shows 30 days and a total spend amount. If the spend is similar across groups, you know neither campaign had a dramatically different budget, which is important for a fair comparison.

Getting a column name error?

This dataset uses column names with special characters like # of Purchase and Spend [USD]. In DuckDB, wrap these names in double quotes so the SQL parser treats them as identifiers.

Help me fix a column name error in DuckDB.

Examine the raw funnel numbers side by side

Now that you trust the data quality, it is time to look at the full marketing funnel. This query shows how many people moved through each stage (impressions to purchases) for both campaigns.

  • Query the complete funnel metrics for each campaign by running:
-- Raw funnel numbers
SELECT
    campaign_group,
    SUM("# of Impressions") AS total_impressions,
    SUM("# of Website Clicks") AS total_clicks,
    SUM("# of Searches") AS total_searches,
    SUM("# of View Content") AS total_views,
    SUM("# of Add to Cart") AS total_cart_adds,
    SUM("# of Purchase") AS total_purchases
FROM campaign_data
GROUP BY campaign_group;

What does this tell you?

You now have raw totals for every stage of the customer journey. Look at where the numbers diverge between Control and Test. Does the Test Campaign get more clicks? More cart adds? More purchases?

These raw numbers are the foundation. In the next step you will convert them into rates (like CTR and Conversion Rate) that allow a fair, apples-to-apples comparison.

Take a moment to note which campaign appears stronger at the top of the funnel (impressions, clicks) versus the bottom (cart adds, purchases).

Your data is loaded, explored, and you already have your first observations. Next up, you will turn those raw numbers into proper KPIs that reveal which campaign actually wins.

Calculate Campaign KPIs

You've explored the raw data and seen the total funnel numbers for both campaigns. Now it's time to answer the core question: which campaign actually performs better?

Raw totals can be misleading. A campaign with more clicks might simply have had more impressions. Converting raw counts into rates creates an apples-to-apples comparison across the entire funnel.

In this step, get ready to:
  • Calculate four KPIs (CTR, Conversion Rate, Add-to-Cart Rate, ROAS) for each campaign.
  • Interpret where the Test Campaign outperforms Control and where it falls short.
Write and run the KPI calculation query

You'll calculate four metrics that marketing teams use to evaluate campaign performance. Each metric isolates a different stage of the customer funnel.

What are CTR, Conversion Rate, Add-to-Cart Rate, and ROAS?

  • CTR (Click-Through Rate) = clicks / impressions. Measures how well the ad grabs attention.
  • Conversion Rate = purchases / clicks. Measures how well traffic converts into buyers.
  • Add-to-Cart Rate = cart adds / content views. Measures purchase intent.
  • ROAS (Return on Ad Spend) = revenue / spend. Measures return on investment.
  • Create the kpi_results table by running this query in your DuckDB session:
-- Calculate KPIs per campaign
CREATE TABLE kpi_results AS
SELECT
    campaign_group,
    SUM("Spend [USD]") AS total_spend,
    SUM("# of Impressions") AS total_impressions,
    SUM("# of Website Clicks") AS total_clicks,
    SUM("# of Searches") AS total_searches,
    SUM("# of View Content") AS total_views,
    SUM("# of Add to Cart") AS total_cart_adds,
    SUM("# of Purchase") AS total_purchases,
    ROUND(SUM("# of Website Clicks") * 1.0 / SUM("# of Impressions"), 4) AS ctr,
    ROUND(SUM("# of Purchase") * 1.0 / SUM("# of Website Clicks"), 4) AS conversion_rate,
    ROUND(SUM("# of Add to Cart") * 1.0 / SUM("# of View Content"), 4) AS add_to_cart_rate,
    ROUND((SUM("# of Purchase") * 50.0) / SUM("Spend [USD]"), 2) AS roas
FROM campaign_data
GROUP BY campaign_group;

What does this query do?

  • CREATE TABLE kpi_results AS stores the calculated metrics permanently in a new table so you can export them later.
  • SUM aggregations total each funnel metric over the 30-day period per campaign.
  • ROUND(..., 4) keeps rates to 4 decimal places for readability.
  • The ROAS formula assumes $50 revenue per purchase because the dataset does not include actual revenue. This is a common convention for portfolio projects and should be noted in your final recommendation.

Before viewing results, think about what you saw in the raw funnel numbers. Do you expect the Test Campaign to have higher CTR? What about conversion rate?

  • View your KPI results by running:
-- View results
SELECT * FROM kpi_results;

You should see two rows. Each row shows a campaign_group with decimal values for ctr, conversion_rate, add_to_cart_rate, and roas columns populated.

Not seeing any results?

  • Make sure you ran the CREATE TABLE query first. The SELECT reads from the kpi_results table that the previous query created.
  • Check for typos in column names. DuckDB requires exact double-quoted names like "# of Website Clicks" with the hash symbol and spaces.
  • If you see a "table already exists" error, run DROP TABLE kpi_results; first, then re-run the CREATE TABLE query.

Why is my KPI query returning an error or empty results?

✔️ Awesome, I've got everything!

Great. Make sure your DuckDB session is still running for the next substep.

ⓧ I'd like to double check the full code

Here is the complete SQL you should have run in this step so far:

-- Calculate KPIs per campaign
CREATE TABLE kpi_results AS
SELECT
    campaign_group,
    SUM("Spend [USD]") AS total_spend,
    SUM("# of Impressions") AS total_impressions,
    SUM("# of Website Clicks") AS total_clicks,
    SUM("# of Searches") AS total_searches,
    SUM("# of View Content") AS total_views,
    SUM("# of Add to Cart") AS total_cart_adds,
    SUM("# of Purchase") AS total_purchases,
    ROUND(SUM("# of Website Clicks") * 1.0 / SUM("# of Impressions"), 4) AS ctr,
    ROUND(SUM("# of Purchase") * 1.0 / SUM("# of Website Clicks"), 4) AS conversion_rate,
    ROUND(SUM("# of Add to Cart") * 1.0 / SUM("# of View Content"), 4) AS add_to_cart_rate,
    ROUND((SUM("# of Purchase") * 50.0) / SUM("Spend [USD]"), 2) AS roas
FROM campaign_data
GROUP BY campaign_group;

-- View results
SELECT * FROM kpi_results;
Interpret your KPI results

Your two rows of KPI data tell a story about where each campaign excels in the funnel. Time to read that story.

  • Compare the ctr column. Which campaign drives more clicks per impression?
  • Compare conversion_rate. Does the campaign with more clicks also convert those clicks into purchases at a higher rate?
  • Look at add_to_cart_rate. Which campaign generates stronger purchase intent?
  • Compare roas. Which campaign returns more revenue per dollar spent?

You should notice a pattern. The Test Campaign shows higher CTR and Add-to-Cart Rate, meaning it attracts more engagement. But the gap narrows or disappears at the purchase stage.

Why does higher engagement not always mean more purchases?

Many factors influence the final purchase step: pricing, checkout friction, and product relevance all play a role. A campaign can be excellent at attracting attention without being great at closing the sale.

Identifying this gap is exactly what stakeholders need to know. It tells them where to focus optimization efforts.

  • Write down your observations about where the two campaigns diverge in the funnel. Note which campaign wins on engagement metrics and whether that advantage carries through to purchases and ROAS.

You now have a clear, data-backed picture of how both campaigns perform across the funnel. Next up, you'll turn these numbers into a visual dashboard that communicates the story to stakeholders who will never read a SQL query.

Build Your Tableau Dashboard

Your SQL analysis proved which campaign wins on each metric. Numbers in a terminal tell the story to you, but stakeholders need to see it.

In this step, you will export your DuckDB results to CSV files and build a Tableau dashboard that transforms your KPI numbers into a visual story anyone can read at a glance.

In this step, get ready to:
  • Export your KPI results and daily data from DuckDB to CSV files.
  • Connect Tableau Desktop Public Edition to your exported CSVs.
  • Build a two-sheet dashboard with a KPI bar chart and a funnel chart.
Export your analysis results to CSV

Tableau reads flat files, not DuckDB databases directly. You need to export your tables to CSV so Tableau can connect to them.

  • Switch back to your terminal where DuckDB is running.
  • Export the KPI summary table by running this command:
-- Export KPI summary
COPY (SELECT * FROM kpi_results) TO 'kpi_results.csv' (HEADER, DELIMITER ',');

What does this command do?

The COPY command writes the result of a query to a file on disk. HEADER includes column names as the first row. DELIMITER ',' produces a standard comma-separated file that Tableau can read natively.

  • Export the daily campaign data by running this command:
-- Export daily data
COPY (SELECT * FROM campaign_data) TO 'campaign_daily.csv' (HEADER, DELIMITER ',');
  • Confirm the files were created by running this verification query:
SELECT 'kpi_results.csv' AS file, COUNT(*) AS rows FROM read_csv_auto('kpi_results.csv')
UNION ALL
SELECT 'campaign_daily.csv', COUNT(*) FROM read_csv_auto('campaign_daily.csv');

You should see 2 rows for kpi_results.csv and 60 rows for campaign_daily.csv.

Seeing a file not found error?

Make sure you launched DuckDB from your C:\ab-test-project\ folder. The COPY command writes files relative to where DuckDB was started. If you are unsure, exit DuckDB with .exit, navigate to the correct folder with cd C:\ab-test-project, and reopen with duckdb ab_test.duckdb.

Help me troubleshoot the DuckDB COPY export error

Connect Tableau to your CSV files

With your data exported, you can now point Tableau at the CSV files to start building visualizations.

  • Switch to Tableau Desktop Public Edition (it should still be open from earlier).
  • Under Connect on the left side of the Start screen, click Text File.
  • Navigate to C:\ab-test-project\, select campaign_daily.csv, and click Open.

Tableau opens the Data Source page. You should see a table preview showing columns like Campaign Name, Date, Spend [USD], and campaign_group.

  • Now add the KPI summary as a second data source. In the top menu bar, click Data, then click New Data Source.
  • Click Text File again.
  • Select kpi_results.csv and click Open.
  • Click the Sheet 1 tab at the bottom of the workbook to go to your first worksheet.

You should see the Data pane on the left with your connected data source fields listed.

Columns look empty or garbled?

If the preview shows no data or strange characters, check that you exported with HEADER and DELIMITER ',' in your COPY command. Go back to DuckDB and re-run the export if needed.

Help me fix my Tableau CSV connection

Build the KPI bar chart and funnel chart

You will create two worksheets: one comparing KPIs side by side for each campaign, and one showing the marketing funnel from impressions down to purchases.

  • Make sure kpi_results is selected as the active data source in the Data pane (click its name if it is not already highlighted).
  • Drag Measure Names to the Columns shelf.
  • Drag Measure Values to the Rows shelf.
  • Drag Campaign Group to the Color mark on the Marks card.
  • Filter the measures to show only the four KPIs. Right-click Measure Names on the Columns shelf, select Filter, and check only Ctr, Conversion Rate, Add To Cart Rate, and Roas. Click OK.
  • Double-click the sheet tab at the bottom and rename it to KPI Comparison.

You should see a grouped bar chart with two colored bars (Control and Test) for each of the four KPIs.

Why use Color for campaign_group?

Placing the campaign group on the Color mark creates side-by-side bars automatically. This makes it instantly clear which campaign scores higher on each metric without the viewer needing to read axis labels carefully.

  • Create a second worksheet by clicking the New Worksheet button at the bottom of the workbook.
  • Make sure kpi_results is selected as the data source in the Data pane.
  • Drag Campaign Group to the Color mark on the Marks card.
  • Drag Measure Names to the Rows shelf.
  • Drag Measure Values to the Columns shelf.
  • Filter Measure Names to show only the funnel stages. Right-click Measure Names on the Rows shelf, select Filter, and check only Total Impressions, Total Clicks, Total Views, Total Cart Adds, and Total Purchases. Click OK.
  • Double-click the sheet tab at the bottom and rename it to Funnel Chart.

You should see each funnel stage broken down by campaign color, showing how volumes decrease from Impressions to Purchases.

Make it look like a real funnel

For a cleaner funnel shape, manually sort the Measure Names on the Rows shelf from largest (Impressions) to smallest (Purchases). Right-click Measure Names on Rows, select Sort, choose Manual, and drag items into funnel order.

  • Now combine both sheets into a dashboard. Click the New Dashboard icon at the bottom of the workbook.
  • From the Sheets list on the left, drag KPI Comparison onto the empty dashboard canvas.
  • Drag Funnel Chart from the Sheets list and drop it below the first sheet on the canvas.
  • Double-click the dashboard title at the top and type eCommerce A/B Test: Control vs. Test Campaign.
  • Add a subtitle by dragging a Text object from the Objects section on the left onto the dashboard below the title. Type Which campaign drives more purchases? and click OK.

Before you look at the finished result, predict: based on your SQL analysis, which campaign do you expect to have taller bars on CTR, and which on Conversion Rate?

Look at your dashboard now. You should see both sheets arranged on a single view with a clear title, subtitle, and color-coded bars distinguishing Control from Test. All four KPIs are visible in the bar chart, and the funnel shows the full progression from Impressions through Purchases.

Dashboard looks empty or only shows one sheet?

Make sure you dragged the sheet names from the Sheets list on the left side of the dashboard editor, not from the tabs at the bottom. If a sheet appears blank, click into it and verify the data source is set to kpi_results.

Help me fix my Tableau dashboard layout

Your dashboard is ready to share. In the next step, you will publish it to Tableau Public so anyone can interact with it, and write the executive recommendation that turns your analysis into a business decision.

Publish and Write Your Recommendation

Your dashboard visualizes the full A/B test story on your local machine. But a hiring manager cannot interact with a file sitting on your computer.

In this step, you will publish your dashboard to Tableau Public so anyone with the link can explore your analysis. You will also write a short executive recommendation that translates your KPI evidence into a clear go/no-go decision.

In this step, get ready to:
  • Publish your dashboard to Tableau Public as a live, shareable portfolio piece.
  • Write a 3-4 sentence executive recommendation backed by your SQL analysis.
Publish your dashboard to Tableau Public

Publishing creates a permanent URL that anyone can visit to interact with your charts. This is what turns a local analysis into a shareable portfolio piece.

  • In Tableau Desktop Public Edition, make sure your dashboard tab is active (click its tab at the bottom of the screen).
  • Click Server in the top menu bar.
  • Click Tableau Public in the dropdown.
  • Click Save to Tableau Public.
  • Sign in with your Tableau.com account credentials when the sign-in dialog appears.
  • Type eCommerce A/B Test Analysis in the workbook name field.
  • Click Save.

Before the upload finishes, what do you think you will see in your browser once it completes?

Tableau uploads your workbook and automatically opens your published dashboard in a new browser tab. You should see your interactive funnel chart and KPI comparison live on the web.

What happens when you publish?

Tableau creates a data extract and uploads everything to your Tableau Public profile. The workbook title becomes searchable metadata that helps others discover your viz.

All workbooks published to Tableau Public are public and freely accessible to anyone with the link. There is no private publishing option on this platform.

Save to Tableau Public is greyed out?

Make sure a worksheet or dashboard tab is active at the bottom of your screen. The option is not available when the Data Source tab is selected.

Confirm your workbook has at least one field placed on a sheet. An empty sheet cannot be published.

Why can't I publish my Tableau workbook?

  • Open your Tableau Public profile page in the browser tab that Tableau opened.
  • Confirm you see eCommerce A/B Test Analysis listed as a published workbook on your profile.
Write your executive recommendation

The final skill this project proves is translating numbers into a decision. An executive recommendation states what the data says and what action the business should take, in language a non-technical stakeholder can act on.

What goes in an executive recommendation?

A strong recommendation has three parts: which campaign performed better overall, the specific KPI evidence that supports that conclusion, and a clear next action for the business.

Your audience has not seen the SQL. They need the conclusion, the proof, and the decision in 3-4 sentences.

Your recommendation should cover these three components:

  • State which campaign performed better overall based on the full funnel picture.
  • Cite specific KPI evidence. Reference the Test Campaign's CTR and Add-to-Cart Rate improvements, and note whether those translated into higher purchases or ROAS.
  • Recommend a specific business action: keep the Control Campaign, iterate on the Test Campaign's checkout flow to close the conversion gap, or extend the experiment for more data.

✔️ I'll give it a go!

Write 3-4 sentences covering the three components above. Use your KPI query results from Step 3 as evidence.

ⓧ Maybe a little help...

Here is an example structure you can adapt using your own numbers:

"The Test Campaign generated higher engagement at the top of the funnel, improving CTR by [your CTR difference] and Add-to-Cart Rate by [your rate difference] compared to Control. However, this increased intent did not translate into a statistically significant lift in final purchases or ROAS. I recommend iterating on the Test Campaign's checkout experience to reduce cart abandonment, then re-running the experiment for an additional 30 days before scaling spend."

Replace the bracketed values with the actual numbers from your KPI results. Adjust the recommendation to match what your data shows.

  • Save your written recommendation in a text file, a note, or directly in your Tableau dashboard as a text box.

Add your recommendation to the dashboard

You can drag a Text object from the dashboard pane onto your Tableau dashboard and paste your recommendation there. This keeps everything in one shareable link. Re-publish after adding it.

Verify your published dashboard is live
  • Open a new browser tab and navigate to your Tableau Public profile (the URL follows the pattern public.tableau.com/app/profile/yourname).
  • Click on eCommerce A/B Test Analysis to open the interactive view.
  • Hover over the charts to confirm interactivity works for any visitor.

You should see your funnel chart and KPI comparison responding to hover and filter interactions. This is the exact URL you can share with hiring managers or include in a portfolio.

Secret mission

Add a Daily Trend Analysis

Your aggregate KPIs tell you which campaign won overall, but they hide whether performance was improving or fading over the 30-day test period. In this extension, you will add a daily trend analysis that reveals temporal patterns and strengthens your executive recommendation with time-based evidence.

Clean Up Your Resources

Clean Up Your Resources

This project runs entirely locally with free tools, so there are no ongoing costs. Decide whether to keep your resources running, pause them to come back later, or delete them entirely.

Resources you used:

  • Local project folder C:\ab-test-project\ with all CSV and database files.
  • Published Tableau Public workbook eCommerce A/B Test Analysis.
  • DuckDB CLI (installed via winget).
  • Tableau Desktop Public Edition (installed application).

Keep everything running

No action needed. Choose this if you plan to iterate on your dashboard, refine your SQL queries, or use this project as a portfolio piece.

  • Your ab_test.duckdb database stays on disk, ready for new queries anytime you run duckdb ab_test.duckdb.
  • Your Tableau Public dashboard remains live at its published URL.
  • DuckDB CLI and Tableau Desktop Public Edition remain installed on your machine.
  • Your Kaggle and Tableau.com accounts remain active.

Pause - I'll come back to this later

Free up disk space while keeping your accounts and published work intact. You can re-download the dataset and re-run your SQL queries later.

  • Delete the local CSV files you no longer need (campaign_daily.csv, kpi_results.csv, daily_metrics.csv) but keep ab_test.duckdb and the raw CSVs in case you want to query again.
  • Leave your Tableau Public dashboard published. It costs nothing and serves as a portfolio piece.
  • Keep DuckDB CLI installed. It takes minimal disk space.

Delete - I don't want to use this again

Remove all project resources and start fresh. This removes your local files, published dashboard, and installed tools.

  • Delete your local project folder by opening PowerShell and running the command below.
rmdir /s /q C:\ab-test-project
  • Delete your published Tableau Public workbook. Go to your Tableau Public profile page, click the More Actions icon on the eCommerce A/B Test Analysis viz, then select Delete This Viz.
  • Uninstall DuckDB CLI by running the command below in PowerShell or Command Prompt.
winget uninstall DuckDB.cli
  • Uninstall Tableau Desktop Public Edition. Open Settings > Apps > Apps & features, find Tableau Public, click More > Uninstall.
  • Optionally delete your Tableau Public profile. Sign in to Tableau Public, click your profile icon, select Settings, scroll to the Delete Tableau Public Profile section, and select Delete My Tableau Public Profile. Enter your email address and confirm.

Nice Work!

Nice Work!

You just took raw A/B test CSVs, ran a full SQL-based funnel analysis, and turned the results into a live, shareable Tableau Public dashboard with a clear business recommendation.

You've learned how to:

  • Calculate four core campaign KPIs (CTR, Conversion Rate, Add-to-Cart Rate, ROAS) from raw A/B test data using DuckDB and SQL.
  • Build and publish a Tableau Public dashboard that visualizes campaign performance as an interactive portfolio piece anyone can access via a single URL.
  • Write an executive recommendation that translates technical A/B test findings into a clear, actionable business decision.
  • Secret Mission: Added a daily trend analysis showing how campaign performance evolved over the 30-day test period.

Ready to quiz yourself?