clickmax-analytics
Use when the user asks business/revenue/KPI questions like how much they made, how they are performing, top products, lead counts, funnel performance, or campaign/email open rates over a period.
SKILL.mdskills/clickmax-analytics/SKILL.md
GitHubWhen this applies
Use this skill for business/KPI questions answered by specific analytics cuts over a date range: revenue totals, period-over-period sales, lead/conversion metrics, funnel step performance, messaging engagement, campaign (broadcast) and per-channel message performance, top products, most-accessed sales pages, and recent workspace activity.
Not this skill
- payment dashboard browsing, my-sales rows, or drilling into one loss/recovery cohort (
failed,canceled,refunded,chargedBack,dispute,pending) ->clickmax-payments-dashboard-analysis(the sales-overview bundle below stays here) - refund/chargeback operations on a transaction ->
clickmax-transaction-operations - raw per-lead timelines or owner activity aggregates ->
clickmax-leads-activity-analysis - finding/filtering individual leads ->
clickmax-leads - building or reading a saved Insights dashboard of opportunities BI ->
clickmax-insights-dashboards
Key assumptions
- these are workspace-scoped read-only cuts; do not ask for workspace/owner ids.
- date filters are
startDate/endDate(ISO date strings); backend clamps start to two-years-ago and end to today/tomorrow, so out-of-range dates are silently trimmed. - comparison tools (
analytics_sales_metrics,analytics_leads_metrics,analytics_messages_metrics) take a current window plus apreviousStartDate/previousEndDatewindow; set both windows explicitly for honest growth reads. projectSlugs,funnelIds,pageIdsare optional array filters; empty means whole workspace.- percentage fields are 0..1 fractions (multiply by 100 for display); money fields are already amounts, not cents-strings.
- revenue splits:
analytics_total_salesreturnstotalInSales(internal/native),totalExternalSales(imported platforms, withexternalBreakdownper platform), andtotalRevenue(sum). State which one you mean. - there is no direct "lost/refused revenue" cut in this skill;
previousPeriodGrowth(inanalytics_sales_metrics) can be negative but means decline vs the prior window, not lost money. analytics_top_productslimitdefaults 5 (max 100);analytics_sales_pageslimitdefaults 5 (max 20).
Sales overview bundle (MANDATORY)
Sales-overview question ("como estão minhas vendas", "quanto faturei", "quanto vendi hoje", "quantas vendas", "quanto estou perdendo", "resumo das vendas", "how are my sales") = ONE complete answer, never only the literal number. Sellers expect faturado + a recuperar + why sales fail + what to do, without asking one by one.
Run in the SAME Code Mode script, same window + filters:
| Call | Gives |
|---|---|
mcp__plugin_clickmax_clickmax__analytics_total_sales |
faturado (totalRevenue + internal/external split) |
mcp__plugin_clickmax_clickmax__recovery_recoverable_revenue |
total a recuperar (deduplicated buckets: failed, canceled, refunded, pixPending, boletoPending, cartAbandonment) |
mcp__plugin_clickmax_clickmax__transactions_failure_breakdown |
failures by stable code + value |
- Map
from/to(failure breakdown) andtransactionPeriod(recovery) to the samestartDate/endDatewindow. - Translate failure
code→ label + next action via theclickmax-failure-diagnosismap (activate_skillit); never print raw gateway reasons or rawcode. - Headline "a recuperar" = recovery total (deduplicated). Failure-breakdown
count/valueare per ATTEMPT (same buyer retrying counts N times) → label them "tentativas", never "pessoas", never sum them into the recoverable headline. - NEVER page
dashboard_my_salesrows to hand-count failures or buyers for this answer. - One tool failing → still answer with the others and say which part is missing.
- Skip the bundle only when the user asks for ONE specific cut ("só o faturamento", "top produtos", "quantos leads").
Thought process
- Sales-overview question → run the bundle above. Otherwise map the question to the narrowest tool:
- revenue-only cut ("só o faturamento") ->
analytics_total_salesfor the range (headline revenue: internal + external + total), oranalytics_sales_metricswhen they also want conversion, top product, or growth vs a prior period. - "quantos leads" / lead conversion / lead price ->
analytics_leads_metrics; lead-engagement overview across lists ->analytics_leads_overview. - "top produtos" / best sellers ->
analytics_top_products. - "desempenho do funil" ->
analytics_funnel(step + aggregate stats + sales history). - messaging engagement ->
analytics_messages_metrics; automation reach/executions ->analytics_flows_overview. - campaign open/click rate, per-channel delivery/open/bounce, WhatsApp template reads -> see
### Campaign and message performance. - page traffic ->
analytics_sales_pages; latest workspace movement ->analytics_recent_activities.
- revenue-only cut ("só o faturamento") ->
- "quanto estou perdendo" / lost money → the bundle's recovery total + failure ranking IS the answer (recoverable money, not consummated loss). Extra leakage signals, labeled as such, never as a loss total: low
salesConversionPercentage,totalViewsvstotalProductsSold, negativepreviousPeriodGrowth(all fromanalytics_sales_metrics). - For period-over-period questions, always pass an explicit previous window so growth is meaningful.
Execute guide
- Headline revenue for a window: use
mcp__plugin_clickmax_clickmax__analytics_total_saleswithstartDateandendDatecovering the window, optionally scoped byprojectSlugs; readtotalRevenueplus thetotalInSales/totalExternalSalessplit. - Sales performance with comparison: use
mcp__plugin_clickmax_clickmax__analytics_sales_metricswithstartDate/endDatefor the current window andpreviousStartDate/previousEndDatefor the prior window; readtotalAmount,salesConversionPercentage,totalProductsSold,products,topConversionProduct, andpreviousPeriodGrowth. - Lead metrics: use
mcp__plugin_clickmax_clickmax__analytics_leads_metricswith the same window/previous-window pattern plus optionalfunnelIds/pageIds; readtotalLeads,leadConversionPercentage,leadAveragePrice, andleadsPerMonth. - Lead-engagement overview: use
mcp__plugin_clickmax_clickmax__analytics_leads_overviewwithstartDate/endDatefor engaged contacts, active flows, and per-list engagement. - Top products: use
mcp__plugin_clickmax_clickmax__analytics_top_productswithstartDate/endDate, optionalfunnelIdsorproductId, andlimitfor how many to rank. - Funnel performance: use
mcp__plugin_clickmax_clickmax__analytics_funnelwithfunnelIdsand/orprojectSlugsplus the date window; readsteps,stats, andsalesHistory. - Messaging engagement: use
mcp__plugin_clickmax_clickmax__analytics_messages_metricswith window + previous window; readtotalMessagesSentand per-channel (mail,whatsApp,telegram) engaged percentages. - Automation reach: use
mcp__plugin_clickmax_clickmax__analytics_flows_overviewwithprojectSlugsand the window foractiveFlows,totalExecutions, andtopFlows. - Sales-page traffic: use
mcp__plugin_clickmax_clickmax__analytics_sales_pageswith optionalprojectSlugs/funnelIdsandlimit. - Recent activity: use
mcp__plugin_clickmax_clickmax__analytics_recent_activitieswithstartDate/endDateand optionalprojectIds,funnelIds,categories. - Showcase prompt "quanto faturei nos últimos 15 dias e quanto estou perdendo":
- Window:
endDate= today,startDate= today − 15d; prior 15 days →previousStartDate/previousEndDate. - Run the bundle +
mcp__plugin_clickmax_clickmax__analytics_sales_metrics(conversion, top product,previousPeriodGrowth) over the same 15 days.
- Window:
- Keep the same date window and filters across tools in one answer so numbers stay comparable.
Campaign and message performance
| Question | Tool + input | Read |
|---|---|---|
| "how did my campaigns do" / "what is my open rate" | mcp__plugin_clickmax_clickmax__broadcasts_list with channel = email, perPage = 20 (50 for a baseline) |
each campaign's rates (open/click/bounce over sent) + volume-weighted average across sent campaigns; campaign sends only |
| "how is email/WhatsApp performing overall in a period" (campaigns + automations) | mcp__plugin_clickmax_clickmax__messages_metrics for the window, again for the previous window of the same length; optional platform (WhatsApp = gupshup) |
per-platform total, reached, opened, failed, bounced, spamComplaints, openRate / failureRate / bounceRate, trend vs previous window |
| "why did this campaign do well/badly" / "when do people open" | mcp__plugin_clickmax_clickmax__broadcasts_insights with broadcastId from mcp__plugin_clickmax_clickmax__broadcasts_list |
opensByHour, topLinks, devices, clients, geo, engagement (open/click rate + delta vs previous campaign), creditCost |
| WhatsApp template reads/clicks | mcp__plugin_clickmax_clickmax__gupshup_template_analytics with the template externalId from mcp__plugin_clickmax_clickmax__gupshup_templates_list (only templates submitted to Meta have one) |
sent, delivered, read, clicked, readRate / clickRate over delivered |
messages_metricsopenRate= opened / reached, first opens only; no clicks there → click rates come frombroadcasts_list.- automation (flow) emails are not in
broadcasts_list→messages_metricscovers campaigns + automations combined. - rates here are 0..1 fractions or
nullwhen the denominator is 0; shownullas "no data", not 0%.
Report
- Open with the period assumed and the workspace scope (all projects unless the user narrowed it).
- Answer in plain business language with formatted currency and percentages (fractions ×100); never surface UUIDs, slugs, or raw payloads.
- Lead with the headline number the user asked for, then the strongest supporting cut (growth vs prior period, top product, conversion).
- The runtime renders presentation cards: emit a
cx-metricfor each headline KPI (revenue, conversion, leads) and acx-rankingfor top-products / top-flows lists instead of long inline tables. - Bundle answer order:
cx-herofaturado (value-tone="positive") →cx-heroa recuperar (icon="database-sync",warning) →cx-rankingof failure reasons by value, every rowtone="warning",hint= next action (clickmax-failure-diagnosisrules) → close with ONE opt-in next step (e.g. recovery automation for the top reason) via thequestiontool. No markdown tables for this data. Empty recovery → "Nada a recuperar no período 🎉". - Cap ranked lists and summarize the tail as
+N more. - When "loss" was requested, report the recoverable total from the bundle (recoverable, not lost); never invent a loss total.
- Treat follow-up actions as opt-in only.
Warnings
- Do not present
previousPeriodGrowthor a negative trend as "money lost"; it is a period-over-period delta. - Do not merge
totalExternalSalesinto native-sales conclusions without labeling it; external is imported-platform revenue. - Comparison tools need both windows; a missing previous window makes growth meaningless.
- Do not invent refund, chargeback, or abandoned-cart totals — take them only from
recovery_recoverable_revenue. - Backend clamps dates to the last two years; flag it if the user asked for older data.
- Never compare a campaign open rate (
broadcasts_list, over sent) with amessages_metricsopen rate (over reached, campaigns + automations) as if they were the same number: different denominators and scopes.
Anti-patterns
- Answering a sales-overview question with only the revenue number and making the user ask for recoverable value, failures, and next action one by one.
- Answering "quanto estou perdendo" with a fabricated loss number instead of the bundle's recoverable total.
- Dumping every product/page/activity row instead of a ranked, capped summary.
- Reporting fractions as if they were already percentages.
- Reusing this skill for per-lead timelines or transaction refund operations.
- Asking the user for workspace or owner ids.
Clickmax skill revision: 30bc1243c2ed