Skip to content

Campaign Analytics

Navigate to Analytics → Spending → Campaign in the sidebar, or open /analytics/campaigns.

Campaign performance analytics
Campaign performance analytics

Tab Campaign displays a table of all campaign runs that occurred within the selected date range. Each row represents a single campaign execution with status, delivery volume, efficiency metrics, and cost.

Date parameters are taken from the global date range. The limit always set to 20.

FilterFunction
Date RangeGlobal filter at the top of the Analytics page — sends startDate and endDate to the API

This tab has no additional filters besides the global date range. If no date range has been selected, an alert is displayed: “Please select a date range to view campaign deliveries.”

The columnDescriptionHow It Is Calculated
Run DetailsCampaign name and run IDcampaign_name as bold text; run_id as small monospace text below it, width-limited to 200px with truncate
StatusCampaign run status badgeBased on the field status — see the status table below
TimelineRun start timestart_time is formatted with date-fns format PPp (e.g., “Jun 1, 2026, 10:30:00 AM”)
VolumeNumber sent vs. total recipientssent_count.toLocaleString() / total_recipients.toLocaleString() — e.g., “9,500 / 10,000”
EfficiencyDelivery rate and read rateCalculated on the client side — see the “Efficiency Calculation” section
CostTotal run costformatFinancialValue(total_cost, 'display', currency) — value divided by 100,000 then formatted as currency
ActionsButton to view the detailed report”View Report” button — leads to /campaigns/{campaign_id}/runs/{run_id}

Two efficiency metrics are computed on the client side (frontend), not backend:

MetricFormulaEdge Condition
Delivery Rate(delivered_count / sent_count) * 100If sent_count == 0, the result is 0%
Read Rate(read_count / sent_count) * 100If sent_count == 0, the result is 0%
API StatusBadge ColorLabel
RUNNINGBiru (bg-blue-500/20 text-blue-500)“Running”
COMPLETEDHijau (bg-green-500/20 text-green-500)“Completed”
FAILEDRed (variant destructive)“Failed”
OtherStandard outlineOriginal value from the API

Clicking a table row (or the “View Report” button) navigates to the campaign run detail page:

/campaigns/{campaign_id}/runs/{run_id}

The detail page shows individual messages per recipient along with the status, time, and cost per message.

AspectDetails
Page size20 runs per page
Controls”Previous” and “Next” buttons
Indicator”Page X of Y” format
VisibilityPagination controls only appear if totalPages > 1

When there are no campaign runs in the selected period:

  • The table displays a single row with the text: “No campaign deliveries found in this period.”
  • The column spans all 7 columns (colspan = 7).
ConditionDisplay
No date range selectedYellow alert with a triangle icon: “Please select a date range to view campaign deliveries.”
Token not found / API failureRed alert with an error message
Loading dataAnimated spinner (Loader2) in the center of the content area

Field total_cost from the API uses integer scale (multiplied by 100,000). The portal calls formatFinancialValue(total_cost, 'display', currency) which divides by 100,000 and then formats as currency:

  • IDR: no decimals (e.g., Rp 500,000)
  • USD: 2 decimals (e.g., $3.50)
  • Efficiency metrics (delivery rate and read rate) are calculated on the frontend using the ratio delivered_count/read_count against sent_count.
  • Entire table rows are clickable to navigate to the run detail (not just the “View Report” button).
  • There is no direct export option in this tab — use Export Data to export campaign data.