## Mastering Report Filters in Alpha Insights

Filters are the secret to creating powerful, focused reports. They let you slice and dice your data to answer specific business questions. Instead of looking at everything, filters help you zoom in on exactly what matters.

### Why Use Filters?

Without filters, you're looking at your entire store's data - which can be overwhelming and hard to draw conclusions from. Filters help you:

- Find specific insights: "Which products are profitable during holiday sales?"
- Compare segments: "Do different traffic sources have different profit margins?"
- Identify problems: "Which traffic sources have low conversion rates?"
- Track campaigns: "How did my Black Friday Facebook Ads perform?"
- Analyze trends: "Are profit margins improving month over month?"

#### Accessing Filters

Filters appear in two places:

### In the Report Builder

1. Create or edit a report
2. Look for the Filters panel on the left side
3. Click Add Filter to add new filters

#### In Pre-Built Reports

1. Open any report (Store Overview, Product Performance, etc.)
2. Look for filter controls at the top of the report
3. Click on any filter to change its value

### Types of Filters

#### Date Range Filters

The most commonly used filter - controls what time period your report covers.

### Preset Date Ranges

Quick access to common time periods:

- Today: Current day so far
- Yesterday: The previous day
- Last 7 Days: Past week
- Last 30 Days: Past month
- This Month: First day of current month until today
- Last Month: Complete previous calendar month
- This Quarter: Current fiscal quarter
- This Year: January 1st until today
- All Time: Your entire store history

### Custom Date Ranges

Pick specific start and end dates:

1. Click the date range filter
2. Select Custom Range
3. Choose start date from calendar
4. Choose end date from calendar
5. Click Apply

Example use cases:

- "November 20 - December 25" for holiday season analysis
- "First week of January" to see post-holiday returns
- "Your store's launch date - today" for lifetime analysis

### Comparison Mode

See how current period compares to previous:

1. Select your date range (e.g., "Last 30 Days")
2. Toggle Compare to Previous Period ON
3. Metrics will show changes: +15%, -3%, etc.

This automatically compares:

- Last 7 days → Previous 7 days
- This month → Last month
- Custom range → Same length period before it

#### Product Filters

Focus your report on specific products or product groups.

### Filter by Specific Products

1. Click Add Filter → Products
2. Start typing a product name or SKU
3. Select from the dropdown (you can select multiple)
4. Click Apply

Use case: "How did my new product launch perform this month?"

### Filter by Category

1. Click Add Filter → Product Category
2. Select one or more categories
3. Multiple selections use OR logic (products in any selected category)

Use case: "What's the profit margin on my 'T-Shirts' category vs 'Accessories'?"

### Filter by Tag

If you use product tags for organization:

1. Click Add Filter → Product Tag
2. Select tags (e.g., "Bestseller", "Seasonal", "Clearance")

Use case: "Are my bestseller-tagged products actually the most profitable?"

#### Order Filters

Control which orders are included in your report calculations.

### Filter by Order Status

Choose which order statuses to include:

- Any: All order statuses (default includes paid orders)
- Pending: Orders awaiting payment
- Processing: Orders being prepared
- Completed: Fulfilled orders
- On Hold: Orders awaiting action
- Cancelled: Orders that were cancelled
- Refunded: Orders that were refunded
- Failed: Failed payment attempts

Recommended setting: Include "Processing" and "Completed" only for accurate profit calculation.

Use case: "How many orders are stuck in 'Processing' status?"

### Filter by Device Type

See how customers from different devices perform:

- Desktop: Traditional computer orders
- Mobile: Smartphone orders
- Tablet: Tablet device orders

Use case: "Do mobile orders have different average order values?"

### Filter by Query Parameters

Advanced filtering using URL query parameters (UTM tracking, campaign parameters, etc.):

This filter allows you to filter by specific query parameter key-value pairs such as:

- utm_source: facebook, google, newsletter
- utm_medium: cpc, email, social
- utm_campaign: spring_sale, black_friday
- utm_content: banner_ad, text_link
- utm_term: keyword tracking
- ref: referral parameter
- source: custom source tracking

1. Click Add Filter → Query Parameters
2. Select a parameter key (e.g., utm_campaign)
3. Select one or more values for that parameter
4. Add additional parameter pairs if needed (uses OR logic)

Use case: "Which email campaign (utm_campaign=summer_sale) drove the most profit?"

#### Customer Filters

Segment your data by customer characteristics.

### Filter by Billing Country

Filter orders by the customer's billing country:

1. Click Add Filter → Billing Country
2. Select one or more countries from the list

Use case: "Which countries generate the most profit?"

#### Traffic Source Filters

Understand where your profitable customers come from.

### Filter by Traffic Source

Alpha Insights automatically categorizes traffic into these sources:

- Direct: Typed URL or bookmarks
- Organic Search: Google, Bing (unpaid search results)
- Paid Search: Google Ads, Bing Ads
- Social Media: Facebook, Instagram, TikTok, Pinterest (unpaid)
- Paid Social: Facebook Ads, Instagram Ads (requires integration)
- Email: Email marketing campaigns
- Referral: Links from other websites
- Other: Uncategorized sources

1. Click Add Filter → Traffic Source
2. Select one or more traffic sources

Use case: "Which traffic source has the highest profit margin?"

#### Campaign Filters

Track advertising campaign performance (requires Facebook and/or Google Ads integration).

### Filter by Facebook Campaign

After connecting your Facebook Ads account:

1. Click Add Filter → Facebook Campaign
2. Select one or more campaigns from the dropdown
3. View profit, ROAS, and ad spend for selected campaigns

Use case: "What was the ROAS for my 'Holiday Sale 2024' Facebook campaign?"

### Filter by Google Ads Campaign

After connecting your Google Ads account:

1. Click Add Filter → Google Ads Campaign
2. Select one or more campaigns from the dropdown
3. View profit, ROAS, and ad spend for selected campaigns

Use case: "How does my Google Shopping campaign compare to Search campaigns?"

#### Expense Filters

Filter expense data for detailed financial analysis.

### Filter by Expense Category

Filter by the expense categories you've created:

1. Click Add Filter → Expense Category
2. Select categories (e.g., "Advertising", "Software", "Shipping")

Use case: "How much am I spending on advertising this month?"

### Filter by Paid/Unpaid Status

Track expenses by payment status:

- Paid: Expenses that have been paid
- Unpaid: Expenses that are outstanding

Use case: "What are my outstanding expenses this month?"

### Filter by Recurring/One-Time

Separate recurring expenses from one-time costs:

- Recurring: Monthly/yearly subscriptions and regular expenses
- One-Time: Single purchase expenses

Use case: "What are my total recurring monthly costs?"

#### Website Traffic Filters

Analyze website visitor behavior and traffic patterns.

### Filter by Traffic Source

Same traffic source categories as order filters (see above).

### Filter by Device Type

Filter website sessions by device:

- Desktop
- Mobile
- Tablet

Use case: "What percentage of my traffic comes from mobile devices?"

### Filter by Query Parameters

Filter traffic sessions by URL query parameters - same as order query parameter filters.

### Filter by Session Contains Event

Filter sessions that contain specific tracked events:

- page_view: Standard page views
- product_page_view: Product page visits
- product_click: Product clicks
- add_to_cart: Add to cart events
- viewed_cart_page: Cart page views
- viewed_checkout_page: Checkout page views
- init_checkout: Checkout initiated
- checkout_error: Checkout errors
- product_purchase: Completed purchases
- transaction: Transaction events
- form_submit: Form submissions
- log_in: User login events
- log_out: User logout events
- Plus any custom events you've tracked

Use case: "How many sessions added products to cart but didn't complete checkout?"

### Filter by Page URL Contains

Filter sessions by URLs that contain specific text:

1. Click Add Filter → Page URL Contains
2. Enter text values (e.g., "product", "checkout", "blog")
3. Press Enter or click + to add multiple values

Use case: "How much traffic visited pages containing 'product' in the URL?"

#### Combining Multiple Filters

The real power comes from combining filters to answer complex questions.

#### Example 1: Holiday Season Product Performance

Question: "Which products were most profitable during the holiday season?"

Filters:

- Date Range: November 25 - December 31
- Order Status: Completed
- Sort by: Profit (descending)

#### Example 2: Facebook Ads ROI on Specific Products

Question: "Are my Facebook Ads profitable for my new product line?"

Filters:

- Facebook Campaign: Select your active campaigns
- Product Category: New Arrivals
- Date Range: Last 30 Days
- Metrics: Revenue, Ad Spend, Profit, ROAS

#### Example 3: Geographic Profitability Analysis

Question: "Which countries generate the most profit?"

Filters:

- Date Range: This Year
- Group by: Billing Country
- Sort by: Profit (descending)

#### Example 4: Mobile vs Desktop Performance

Question: "Do mobile shoppers have different buying patterns?"

Create 2 reports with these filters:

- Report 1: Device Type: Mobile
- Report 2: Device Type: Desktop

Compare average order value, conversion rate, and profit margins.

#### Filter Performance Tips

### Tip 1: Start Broad, Then Narrow

Begin with wide filters, analyze results, then add more filters to drill down.

#### Tip 2: Use Date Filters First

Always set your date range first - it dramatically reduces data processing time.

### Tip 3: Don't Over-Filter

Too many filters can result in zero results. If no data appears, remove filters one at a time.

#### Tip 4: Document Your Filters

When saving reports, name them descriptively to remember what filters are applied.

### Tip 5: Test Filter Results

Verify filtered data makes sense - click into individual orders to confirm they match your criteria.

#### Common Filter Scenarios

### Scenario: Finding Best-Selling Products by Category

Goal: Identify top performers in each category

Filters:

- Date Range: Last 90 days
- Product Category: Select category
- Sort by: Units Sold (descending)
- Order Status: Completed

### Scenario: Calculating True Ad ROI

Goal: See if your Facebook ads are profitable

Filters:

- Facebook Campaign: Select campaigns
- Date Range: This Month
- Metrics: Revenue, Ad Spend, Profit, ROAS

If ROAS is below 2.0 and profit is negative, your ads need optimization.

### Scenario: Seasonal Comparison

Goal: Compare this holiday season to last year

Filters:

- Date Range: Nov 1 - Dec 31, 2024
- Compare to: Same dates, 2023
- Order Status: Completed

You'll see year-over-year growth in revenue and profit.

### Scenario: Tracking Email Campaign Performance

Goal: Measure email campaign ROI

Filters:

- Query Parameters: utm_campaign = [your_campaign_name]
- Date Range: Campaign duration
- Metrics: Orders, Revenue, Profit

#### Troubleshooting Filters

### Issue: "No data found"

Possible causes:

- Date range has no orders or data
- Filters are too restrictive (too many combined)
- Selected products/categories have no sales

Solution: Remove filters one by one until data appears.

### Issue: "Data seems incorrect"

Possible causes:

- Multiple conflicting filters applied
- Wrong order status selected (e.g., including "Pending" orders)
- Date range doesn't match expectation

Solution: Review all active filters (shown at top of report) and verify each one.

### Issue: "Filter not working"

Possible causes:

- Filter needs to be applied (click "Apply Filters" button)
- Report needs to be refreshed
- Browser cache issue

Solution: Click "Apply Filters" button or refresh the page.

#### Advanced: Custom Query Parameters

Alpha Insights supports these URL query parameter keys by default:

- utm_source
- utm_medium
- utm_campaign
- utm_content
- utm_term
- utm_id
- ref
- coupon
- source
- campaign
- content
- medium
- term
- s (search)
- search
- google_cid
- meta_cid

If you need to track additional custom parameters, developers can add them using the `wpd_ai_report_filters_allowed_keys_for_query_parameter_values` filter. See the Developer Documentation for details.