Analytics & Reports
Track rule performance and measure revenue impact
Dashboard Widgets
Access quick insights from your WordPress admin homepage.
Location: WordPress Admin â Dashboard
Cart Guard adds 4 widgets to your main dashboard:
Widget 1: Recent Violations
âââââââââââââââââââââââââââââââââââââââââââââââââââââââ
â đ Recent Violations (Last 24 Hours) â
âââââââââââââââââââââââââââââââââââââââââââââââââââââââ¤
â âĸ 10:30 AM - Coffee Bundle (Soft-fail) Order #12346â
â âĸ 09:45 AM - Min Cart $50 (Hard-fail) Blocked â
â âĸ 08:15 AM - Laptop Bundle (Manual) Order #12345 â
â â
â [View All Violations â] â
âââââââââââââââââââââââââââââââââââââââââââââââââââââââ
Shows:
– Last 5 violations
– Time, rule name, violation type
– Order number (if completed)
– Click any violation â Jump to order details
Widget 2: Validation Stats
âââââââââââââââââââââââââââââââââââââââââââââââââââââââ
â đ Validation Stats (Last 30 Days) â
âââââââââââââââââââââââââââââââââââââââââââââââââââââââ¤
â Total Validations: 2,847 â
â Clean Orders: 87% (2,477 orders) đĸ â
â Soft-Fail: 12% (342 orders) đĄ â
â Hard-Fail (Blocked): 1% (28 orders) đ´ â
â â
â Revenue Saved: $24,567 â
â (From blocked invalid orders) â
â â
â [View Analytics â] â
âââââââââââââââââââââââââââââââââââââââââââââââââââââââ
Key Metrics:
– Total Validations: Every cart check (add to cart + checkout)
– Clean Orders: Passed all rules (no issues)
– Soft-Fail: Triggered rule but allowed checkout (yellow badge)
– Hard-Fail: Blocked checkout (red badge)
– Revenue Saved: Sum of blocked order totals
Widget 3: Top Performing Rules
âââââââââââââââââââââââââââââââââââââââââââââââââââââââ
â đ Top Performing Rules (Last 30 Days) â
âââââââââââââââââââââââââââââââââââââââââââââââââââââââ¤
â 1. Coffee + Mug BOGO â
â 523 triggers âĸ 88% block rate âĸ $8,234 saved â
â â
â 2. Minimum Cart Value $50 â
â 312 triggers âĸ 35% block rate âĸ $5,890 saved â
â â
â 3. Laptop + Warranty Bundle â
â 189 triggers âĸ 92% block rate âĸ $6,540 saved â
â â
â [View All Rules â] â
âââââââââââââââââââââââââââââââââââââââââââââââââââââââ
Ranking Criteria:
– Sorted by revenue saved (highest first)
– Shows top 3 rules
– Click rule name â Jump to rule editor
Widget 4: Orders Needing Review
âââââââââââââââââââââââââââââââââââââââââââââââââââââââ
â â ī¸ Orders Needing Review â
âââââââââââââââââââââââââââââââââââââââââââââââââââââââ¤
â 3 orders waiting for manager review â
â â
â âĸ Order #12346 (Nov 14, 10:30 AM) â
â âĸ Order #12349 (Nov 13, 3:15 PM) â
â âĸ Order #12351 (Nov 12, 8:45 AM) â
â â
â [Review Orders â] â
âââââââââââââââââââââââââââââââââââââââââââââââââââââââ
Purpose:
– Alerts managers to yellow badge orders
– Shows count and order numbers
– Click “Review Orders” â Filtered orders list
Best Practice: Check this widget daily (morning routine)
Analytics Page (Detailed Reports)
Access comprehensive analytics with filters and export capabilities.
Location: Cart Guard â Analytics
Page Layout
âââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ
â Cart Guard Analytics â
âââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ¤
â [Filter Panel] â
â âĸ Date Range: [Last 30 Days âŧ] â
â âĸ Rule: [All Rules âŧ] â
â âĸ Violation Type: [All Types âŧ] â
â âĸ Customer: [All Customers âŧ] â
â [Apply Filters] [Reset] â
âââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ¤
â [Violation Timeline Chart] â
â [Interactive bar chart - see below] â
âââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ¤
â [Violations Table] â
â [Searchable data table - see below] â
âââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ¤
â [Export Buttons] â
â [Export CSV] [Export JSON] [Export Rule Stats] â
âââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ
Filter Options
Date Range Presets:
– Today
– Yesterday
– Last 7 days
– Last 30 days (default)
– Last 90 days
– Custom range (date picker)
Rule Filter:
– All Rules (default)
– Individual rule dropdown (shows rule names)
Violation Type Filter:
– All Types (default)
– Soft-fail (yellow badges)
– Hard-fail (blocked checkouts)
– Manual orders (blue badges)
– Clean orders (green badges)
Customer Filter:
– All Customers (default)
– Search by email
– Filter by guest vs registered
Violation Timeline Chart
Interactive bar chart showing daily validation results.
âââââââââââââââââââââââââââââââââââââââââââââââââââââââ
â Violation Timeline (Nov 1-30, 2025) â
âââââââââââââââââââââââââââââââââââââââââââââââââââââââ¤
â 100â â
â â ââââ â
â 80 â ââââ ââââ â
â â ââââââââ ââââââââ â
â 60 â ââââââââ ââââââââ ââââ â
â â ââââââââ ââââââââ ââââââââ â
â 40 â ââââââââ ââââââââ ââââââââââââ â
â â ââââââââ ââââââââ ââââââââââââââââ â
â 20 â ââââââââ ââââââââ ââââââââââââââââââââ â
â â ââââââââ ââââââââ ââââââââââââââââââââââââ â
â 0 âââââââââââââââââââââââââââââââââââââââââââââââ â
â Nov 1 Nov 8 Nov 15 Nov 22 Nov 29 â
â â
â Legend: â
â đĸ Green = Clean orders (87%) â
â đĄ Yellow = Soft-fail (12%) â
â đ´ Red = Hard-fail (1%) â
â đĩ Blue = Manual orders (trace) â
âââââââââââââââââââââââââââââââââââââââââââââââââââââââ
Chart Features:
– Stacked bars: Each bar = 1 day, segments = violation types
– Hover tooltips: Shows exact counts for each type
– Click bar: Auto-filters table to that day’s violations
– Export chart: Download as PNG image
Violations Data Table
Searchable, sortable table of all validation events.
ââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ
â [Search: ________] [Show: 25 âŧ] [Export CSV] â
âââââââŦââââââââââââââŦâââââââââââââââââââŦâââââââââââŦâââââââââââŦââââââââââââââââââ¤
â ID â Date/Time â Rule â Customer â Order â Type â
âââââââŧââââââââââââââŧâââââââââââââââââââŧâââââââââââŧâââââââââââŧââââââââââââââââââ¤
â 847 â Nov 14 10:30â Coffee + Mug â Guest â #12346 â â ī¸ Soft-fail â
â 846 â Nov 14 10:15â Min Cart $50 â J. Smith â - â â Hard-fail â
â 845 â Nov 14 09:45â Laptop Bundle â J. Doe â #12345 â â
Passed â
â 844 â Nov 13 16:30â BOGO Promo â Guest â #12344 â â ī¸ Soft-fail â
â 843 â Nov 13 14:20â Wholesale Min â J. Corp â - â â Hard-fail â
â 842 â Nov 13 11:45â Coffee + Mug â S. Lee â #12343 â âšī¸ Manual â
âââââââŧââââââââââââââŧâââââââââââââââââââŧâââââââââââŧâââââââââââŧââââââââââââââââââ¤
â [< Previous] Page 1 of 43 [Next >] â
ââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ
Table Features:
Search Capabilities:
– Search by order number: #12346
– Search by customer email: [email protected]
– Search by rule name: Coffee
– Search by IP address: 192.168.1.100 (fraud investigation)
Column Actions:
– Order #: Click to jump to WooCommerce order detail page
– Rule: Click to open rule editor
– Customer: Click to view customer profile (WooCommerce)
Sorting:
– Click any column header to sort (date, rule name, type)
– Default sort: Newest first
Pagination:
– 25/50/100 rows per page
– Ajax-powered (no page reload)
Export Reports
Cart Guard provides 3 export types for external analysis.
Export 1: Violations CSV
Export detailed violation logs for forensic analysis.
Location: Analytics page â “Export CSV” button
CSV Format:
id,date_time,rule_id,rule_name,customer_email,order_id,violation_type,ip_address,cart_data,user_agent,reviewed_by,review_note,reviewed_at
847,"2025-11-14 10:30:15",735,"Coffee + Mug","[email protected]",12346,"soft_fail_api_down","192.168.1.100","[{\"product_id\":101,\"quantity\":1}]","Mozilla/5.0 (Windows NT 10.0; Win64; x64)","admin","Approved - API was down","2025-11-14 11:00:00"
846,"2025-11-14 10:15:30",740,"Min Cart $50","[email protected]",NULL,"hard_fail_blocked","192.168.1.105","[{\"product_id\":202,\"quantity\":1}]","Mozilla/5.0 (iPhone; CPU iPhone OS 14_0)","","",""
Columns Explained:
| Column | Description | Example |
|---|---|---|
id |
Violation unique ID | 847 |
date_time |
When violation occurred | 2025-11-14 10:30:15 |
rule_id |
Rule database ID | 735 |
rule_name |
Human-readable rule name | Coffee + Mug |
customer_email |
Customer email (or “guest”) | [email protected] |
order_id |
WooCommerce order number | 12346 |
violation_type |
Reason code | soft_fail_api_down |
ip_address |
Customer IP address | 192.168.1.100 |
cart_data |
Full cart snapshot (JSON) | [{…}] |
user_agent |
Browser/device info | Mozilla/5.0… |
reviewed_by |
Manager who reviewed | admin |
review_note |
Manager’s review note | Approved – API down |
reviewed_at |
Review timestamp | 2025-11-14 11:00:00 |
Export Use Cases
Fraud Investigation
1. Export violations CSV
2. Filter by IP address in Excel
3. Identify repeat offenders (same IP, multiple violations)
4. Cross-reference with order data
5. Flag suspicious accounts
Customer Support
1. Customer emails: "Why was my order blocked?"
2. Search CSV by email or order number
3. Find exact rule that triggered
4. See cart contents at time of violation
5. Respond with specific explanation
Compliance Audits
1. Export date range (e.g., Q1 2025)
2. Filter by specific rule (e.g., "Age Verification")
3. Prove enforcement to regulators
4. Show manager review notes
5. Archive for legal retention
Data Analysis
1. Import CSV to Excel/Google Sheets
2. Create pivot tables:
- Violations by hour of day (peak times?)
- Violations by rule (which rules trigger most?)
- Block rate by customer type (guests vs registered)
3. Identify optimization opportunities
Export 2: Rule Performance CSV
Export summary statistics for each rule.
Location: Dashboard widget â “Export Rule Stats” button
CSV Format:
rule_id,rule_name,status,total_triggers,soft_fail_count,hard_fail_count,block_rate,revenue_impact,avg_order_value,last_triggered
735,"Coffee + Mug BOGO","active",523,63,460,0.12,"8234.50","15.75","2025-11-14 10:30:15"
740,"Min Cart $50","active",312,89,223,0.35,"5890.00","26.41","2025-11-14 10:15:30"
Columns Explained:
| Column | Description | Example |
|---|---|---|
rule_id |
Rule database ID | 735 |
rule_name |
Human-readable name | Coffee + Mug BOGO |
status |
Active or inactive | active |
total_triggers |
Times rule evaluated | 523 |
soft_fail_count |
Yellow badge count | 63 |
hard_fail_count |
Blocked checkouts | 460 |
block_rate |
Percentage blocked | 0.12 (12%) |
revenue_impact |
Sum of blocked order values | 8234.50 |
avg_order_value |
Average cart value for rule | 15.75 |
last_triggered |
Most recent trigger | 2025-11-14 10:30:15 |
Export 3: Analytics Summary JSON
Export structured data for API integrations.
Location: Analytics â “Export JSON” button
JSON Format:
{
"export_date": "2025-11-14T10:30:15Z",
"date_range": {
"start": "2025-10-15",
"end": "2025-11-14"
},
"summary": {
"total_validations": 2847,
"clean_orders": 2477,
"soft_fail_count": 342,
"hard_fail_count": 28,
"manual_override_count": 147,
"revenue_saved": 24567.00,
"avg_cart_value": 45.23
},
"top_rules": [
{
"rule_id": "735",
"name": "Coffee + Mug BOGO",
"triggers": 523,
"block_rate": 0.12,
"revenue_impact": 8234.00
},
{
"rule_id": "740",
"name": "Min Cart $50",
"triggers": 312,
"block_rate": 0.35,
"revenue_impact": 5890.00
}
],
"timeline": [
{
"date": "2025-11-14",
"soft_fail": 3,
"hard_fail": 1,
"clean": 87,
"manual": 2
},
{
"date": "2025-11-13",
"soft_fail": 5,
"hard_fail": 2,
"clean": 92,
"manual": 1
}
]
}
Use Cases:
– BI Tools: Import to Tableau, Power BI for dashboards
– Automated Reporting: Cron jobs pull daily stats
– Webhook Notifications: Trigger Slack alerts on thresholds
– Custom Integrations: Build your own analytics platform
Real-World Example: Monthly Performance Report
Scenario: Store manager needs to present Cart Guard ROI to owner
Step 1: Export Rule Performance CSV
1. Go to Cart Guard â Dashboard
2. Click "Export Rule Stats" button
3. Open CSV in Excel
Step 2: Create Summary Metrics
Total Rules Active: 12
Total Validations: 8,450
Block Rate: 8.5% (718 blocked orders)
Revenue Saved: $64,320
Step 3: Identify Top 3 Rules
1. Coffee + Mug BOGO - $18,234 saved (28% of total)
2. Laptop + Warranty Bundle - $15,890 saved (25%)
3. Min Cart $50 Wholesale - $12,450 saved (19%)
Step 4: Identify Problem Rules
Rule: "Category Restriction: Electronics"
- Block rate: 45% (too high, customer friction)
- Revenue impact: $2,300 (low despite high blocks)
- Action: Review rule logic, may be too strict
Step 5: Present Findings
"Cart Guard saved $64,320 last month by blocking 718 invalid orders.
Top 3 rules account for 72% of savings. Recommend reviewing
Electronics rule (45% block rate causing customer complaints)."
Best Practices
For Store Managers
- â Check dashboard daily: Review violations widget every morning
- â Export monthly reports: Create performance summaries for owners
- â Investigate spikes: If violations suddenly increase, check rule logic
- â Track trends: Compare month-over-month block rates
- â ī¸ Don’t ignore soft-fails: Yellow badges = potential system issues
For Store Owners
- â Track ROI: Revenue saved = direct profit impact
- â Compare rule performance: Pause underperforming rules
- â Audit exports quarterly: Review compliance for legal/regulatory needs
- â Share wins with team: Celebrate rules that save significant revenue
- â ī¸ Don’t over-optimize: Some rules have indirect value (brand protection)
Troubleshooting
Issue: Charts Not Loading
Symptoms:
– Analytics page shows blank charts
– Browser console errors
Solutions:
1. Hard refresh browser (Ctrl+Shift+R)
2. Clear WordPress cache
3. Check if Chart.js library loaded (F12 â Network tab)
4. Disable conflicting plugins (deactivate 1 by 1)
Issue: Export CSV Empty
Symptoms:
– Click “Export CSV” button
– Download starts but file is empty
Solutions:
1. Check date range filter (too narrow?)
2. Check if any violations exist in that range
3. Try “Export JSON” instead (different code path)
4. Check PHP error log for permission issues
Next Steps
Now that you understand analytics:
Last Updated: November 14, 2025
Plugin Version: 1.0
