Overview
The analytics module provides real-time insights into your sales performance, inventory status, and business trends through interactive charts and key performance indicators.Accessing Analytics
Today’s Performance Metrics
The top section shows four key performance indicators for today:Total de Ventas (Revenue)
Shows total sales revenue for the current day with percentage change from yesterday.
- Red gradient card with bar chart icon
- Displays total monetary value of sales
- Shows percentage change (e.g., “+8% respecto a ayer”)
- Data sourced from
analyticsService.getTodayStats()
Órdenes Totales (Total Orders)
- Yellow gradient card with document icon
- Shows count of completed transactions
- Includes comparison to previous day
- Helps track sales volume regardless of value
Productos Vendidos (Products Sold)
- Green gradient card with users icon
- Total quantity of items sold today
- Useful for inventory turnover analysis
- Shows growth percentage
Nuevos Clientes (New Customers)
- Purple gradient card with tag icon
- Count of unique customers who made purchases today
- Tracks customer acquisition
- Displays day-over-day change
Inventory Status Analysis
The inventory chart visualizes stock availability:Interpret the segments
- Green segment: Productos disponibles (Available stock)
- Yellow segment: Stock bajo (Low stock - requires reordering)
- Red segment: Agotado (Out of stock)
analyticsService.getInventoryAnalysis():
- Disponible: Products with >10 units or unlimited availability
- Stock Bajo: Products with 1-10 units remaining
- Agotado: Products with 0 stock
Annual Revenue Summary
The annual chart displays monthly revenue trends:Identify trends
Look for:
- Upward trends (business growth)
- Seasonal patterns
- Unusual drops (investigate causes)
- Peak months (prepare for similar periods)
Inventory Rotation
The rotation chart shows which products are selling:Helps identify fast-moving vs. slow-moving inventory.
- Displays product sales distribution
- Highlights top-selling items
- Identifies stagnant inventory that may need promotion
- Informs purchasing decisions
Income Trends (Últimos 7 Días)
The income line chart shows daily revenue:Identify patterns
Look for:
- Weekday vs. weekend differences
- Best performing days
- Days that need attention
analyticsService.getAnalyticsData() which processes daily sales.
Expenses Tracking (Egresos)
The expenses chart mirrors the income chart:- Shows daily operational costs
- Helps monitor spending patterns
- Supports profitability analysis
- Highlights unusual expense spikes
Refreshing Analytics Data
Wait for refresh
The system:
- Calls
analyticsService.getAnalyticsData()to fetch latest data - Updates all charts and KPIs
- Recalculates percentages and trends
Analytics automatically refresh when you navigate to the page, but manual refresh ensures the latest data.
Understanding Calculations
Revenue Calculations
Inventory Status
Growth Percentages
Key Insights to Monitor
Daily Performance
Inventory Health
- High disponible percentage (>70%): Good stock levels
- High stock bajo percentage (>30%): Need to reorder soon
- High agotado percentage (>15%): Urgent attention required
Revenue Trends
- Consistent growth: Business expanding well
- Flat line: Market saturation or need for marketing
- Declining trend: Investigate causes (competition, seasonality, etc.)
Best Practices
Review analytics daily to make data-driven business decisions.
- Check daily: Review KPIs every morning
- Track trends: Look for patterns over weeks and months
- Compare periods: Analyze week-over-week and month-over-month
- Act on insights: Use data to drive inventory and sales decisions
- Monitor inventory: Keep “Agotado” percentage below 10%
- Watch growth metrics: Positive trends indicate healthy business
- Investigate anomalies: Sudden changes need immediate attention
Using Analytics for Decision Making
Inventory Decisions
Sales Strategy
Financial Planning
Troubleshooting
Charts Not Displaying
- Refresh the page (Ctrl+R or Cmd+R)
- Click the “Actualizar” button
- Check your internet connection
- Ensure you’re logged in with valid credentials
Incorrect Data
- Verify date filters are set correctly
- Check that sales have been properly recorded
- Refresh analytics to get latest data
- Contact administrator if discrepancies persist
Performance Issues
- Clear browser cache
- Close unnecessary browser tabs
- Check system requirements
- Try a different browser
Technical Reference
Analytics operations use theanalyticsService.js service:
- Get analytics data:
analyticsService.getAnalyticsData() - Today’s stats:
analyticsService.getTodayStats() - Inventory analysis:
analyticsService.getInventoryAnalysis() - Executive summary:
analyticsService.getExecutiveSummary() - Custom period:
analyticsService.getCustomPeriodData(start, end, groupBy)
https://cemac-api.vercel.app/analysis/sales.