Facebook Campaign Tracking and ROAS Analysis

Once Facebook Ads is connected, Alpha Insights automatically tracks your campaign performance and calculates profitability metrics. This guide shows you how to view campaign data, understand metrics from Facebook's API, and analyze your ad performance.

Accessing Facebook Campaign Data

Campaign List View

The primary way to view your Facebook campaigns:

  1. Go to Alpha Insights → Facebook Campaigns in your WordPress admin
  2. See all campaigns in a sortable table with key metrics
  3. Columns display: Campaign Name, Start Date, Ad Spend, Website Views (Outbound Clicks), Leads, Orders, Conversion Rate, Revenue, and ROAS
  4. Click any campaign title to view detailed campaign data
  5. Use the Ad Account filter at the top to filter by specific ad accounts (if you've connected multiple over time)
  6. Click column headers to sort by that metric

Expenses View

View daily ad spend as expenses:

  1. Go to Alpha Insights → Expenses
  2. Filter by "Facebook Ads" category to see only ad spend
  3. Each entry represents one day of ad spend
  4. These expenses are automatically included in your profit calculations

Dashboard View

See ad spend in context of overall business performance:

  1. Go to Alpha Insights → Dashboard
  2. Facebook ad spend is included in your total expenses
  3. Affects your overall profit calculations automatically

Understanding Campaign Metrics

Important: These metrics come directly from Facebook Marketing API and represent Facebook's tracking of campaign performance.

Ad Spend

What it is: Total amount spent on this campaign (from Facebook's data)

Example: $1,250 spent on "Summer Sale" campaign

Source: Synced from Facebook Marketing API

Updates: Based on your API call schedule (Daily, Every 12 Hours, or Every 6 Hours)

Currency: Automatically converted to your store currency if different from ad account currency

Impressions

What it is: Number of times your ads were shown

Source: Facebook Marketing API

Clicks

What it is: Total clicks on your ads (all clicks, including likes, shares, etc.)

Source: Facebook Marketing API

Website Views (Outbound Clicks)

What it is: Number of clicks that left Facebook and went to your website

Source: Facebook Marketing API field: outbound_clicks

Why it matters: This is the actual traffic sent to your site, used for conversion rate calculations

Leads

What it is: Number of lead form submissions from this campaign

Source: Facebook Marketing API (action_type: lead)

Note: Only applicable if your campaign uses Facebook lead forms

Orders (Purchases)

What it is: Number of purchases Facebook tracked from this campaign

Source: Facebook Marketing API (action_type: purchase)

How tracked: Via Facebook Pixel on your site tracking purchase events

Note: This is Facebook's attribution, which may differ from Alpha Insights' order matching using meta_cid parameter

Revenue (Purchase Value)

What it is: Total purchase value Facebook tracked from this campaign

Source: Facebook Marketing API (action_values for purchase action type)

How tracked: Via Facebook Pixel purchase event value

Currency: Automatically converted to your store currency if needed

ROAS (Return on Ad Spend)

What it is: Revenue generated per dollar spent on ads (as reported by Facebook)

Formula: Purchase Value ÷ Ad Spend

Example: $4,800 revenue ÷ $1,250 spend = 3.84 ROAS

What it means: For every $1 spent, Facebook tracked $3.84 in purchase value

Interpreting ROAS:

Code Reference: Calculated at line 976 of WPDAI_Facebook_API.php

Profit (Facebook's Simple Calculation)

What it is: Simple profit calculated from Facebook's data

Formula: Purchase Value - Ad Spend

Example: $4,800 - $1,250 = $3,550 profit

Important Note: This is a simplified profit that does NOT account for:

Why it matters: This gives you a quick profitability indicator, but for true profit analysis, you should use Alpha Insights' full profit reports which factor in all costs.

Code Reference: Calculated at line 979 of WPDAI_Facebook_API.php

Conversion Rate

What it is: Percentage of website visitors (from ads) who made a purchase

Formula: (Purchases ÷ Outbound Clicks) × 100

Example: (48 ÷ 2,400) × 100 = 2.0% conversion rate

Why it matters: Shows how effective your landing page and offer are at converting traffic

Note: Uses Outbound Clicks (website views) not total clicks, giving you accurate site conversion rate

Code Reference: Calculated at line 970 of WPDAI_Facebook_API.php using wpd_calculate_percentage() helper function

Viewing Campaign Details

Individual Campaign Page

Click any campaign title in the Facebook Campaigns list to view detailed campaign data:

Campaign Information Displayed:

Daily Campaign Data

Alpha Insights stores day-by-day performance data for each campaign (stored in _wpd_daily_data meta field):

Daily Metrics Tracked:

Note: Daily data is available in the database and can be used for custom reports or analytics. The individual campaign page shows aggregate totals.

Analyzing Campaign Performance

Sorting and Filtering Campaigns

On the Facebook Campaigns list page, you can:

Identifying Top Performers

To find your best campaigns:

  1. Go to Facebook Campaigns
  2. Click the ROAS column header to sort by ROAS (highest first)
  3. Look for campaigns with ROAS > 3.0 and significant revenue
  4. These are your winners - consider scaling budget in Facebook Ads Manager

Identifying Poor Performers

To find underperforming campaigns:

  1. Go to Facebook Campaigns
  2. Click the ROAS column header twice to sort ascending (lowest first)
  3. Look for campaigns with ROAS < 2.0 or negative profit
  4. Consider pausing these campaigns or optimizing them in Facebook Ads Manager

Understanding the Data Storage

Database Schema:

Optimizing Based on Data

Scaling Winners

Identify: Campaigns with ROAS >4.0 and positive profit

What Alpha Insights shows you:

Action in Facebook Ads Manager:

  1. Note the campaign characteristics (audience, creative theme, offer)
  2. Increase budget gradually (10-20% increases)
  3. Monitor Alpha Insights to see if ROAS maintains as you scale
  4. Create similar campaigns (lookalike audiences from winners)

Pausing Losers

Identify: Campaigns with ROAS < 2.0 or negative profit

What Alpha Insights shows you:

Action in Facebook Ads Manager:

  1. Pause the campaign to stop spending
  2. Analyze why it failed:
  3. Don't repeat same mistakes in future campaigns

Optimizing Moderate Performers

Identify: Campaigns with ROAS 2.5-3.5

What Alpha Insights shows you:

Actions to test in Facebook Ads Manager:

Analyzing Performance Trends

Using Daily Data:

Alpha Insights stores daily performance data for each campaign. While not visible in the default UI, this data is available in the database (_wpd_daily_data meta field) and can be used to identify:

Data Fields Available Per Day:

Understanding Attribution in Alpha Insights

Two Types of Data: Facebook's vs. Your Store's

1. Facebook's Attribution (what you see in campaign metrics):

2. Alpha Insights' Order Attribution (using meta_cid parameter):

How to Set Up Order Attribution

Add this to your Facebook ad URLs:

meta_cid={{campaign.id}}

Full URL example:

https://yourstore.com/products?meta_cid={{campaign.id}}

What happens:

  1. Facebook replaces {{campaign.id}} with the actual campaign ID
  2. Alpha Insights captures the meta_cid parameter from the landing page URL
  3. When the visitor places an order, the campaign ID is stored in order meta: _wpd_ai_meta_campaign_id
  4. You can then run reports showing actual orders and profit by campaign

Code Reference: Order campaign ID attribution happens in set_order_campaign_id_via_query_param() method (lines 417-473 of WPDAI_Facebook_API.php)

Important Notes About Attribution

Troubleshooting Campaign Data

Issue: Campaign shows but no purchase data

Possible reasons:

Check:

  1. Verify Facebook Pixel is installed on your site
  2. Check Pixel is tracking purchase events in Facebook Events Manager
  3. Wait for next sync (data updates based on your API call schedule)
  4. For Alpha Insights order attribution, verify meta_cid={{campaign.id}} is in your ad URLs

Issue: Revenue doesn't match Facebook Ads Manager

Why they differ:

This is normal! Small discrepancies (5-10%) are expected. Large differences indicate a tracking issue.

Issue: Spend amounts don't match Facebook Ads Manager

Check:

Best Practices

Review Campaign Performance Regularly

  1. Weekly: Review campaigns in Alpha Insights → Facebook Campaigns
  2. Sort by ROAS to identify top and bottom performers
  3. Make budget adjustments in Facebook Ads Manager based on data
  4. Monitor how changes affect performance in subsequent syncs

Set ROAS Goals by Campaign Type

Different campaign objectives should have different targets:

Remember: These are Facebook's tracked ROAS numbers. Your actual profit may differ after accounting for COGS and other expenses.

Use Campaign Tracking Consistently

For best results with Alpha Insights order attribution:

meta_cid={{campaign.id}}

Add this parameter to ALL Facebook ad URLs to enable order-level tracking and profit calculations per campaign.

Understand Data Limitations