Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/Priyanshu471/ad-management/llms.txt

Use this file to discover all available pages before exploring further.

The Analytics page at /advertiser/analytics gives you a deep dive into the performance of individual campaigns. By selecting a campaign from the dropdown, you can instantly render two interactive charts: a CTR line chart that plots click-through rate across 12 monthly periods, and an audience donut chart that breaks down your user base into demographic segments with percentage distributions.

How to Use Analytics

1

Navigate to Analytics

Open the Advertiser portal sidebar and click Analytics, or go directly to /advertiser/analytics.
2

Select a Campaign

Use the campaign dropdown at the top of the page to choose the campaign you want to analyze. The dropdown lists all campaigns from the campaignsCtr array in lib/data.ts. Both charts update immediately upon selection.
3

Review the CTR Chart

The CtrChart renders a line chart showing how your campaign’s click-through rate has changed over 12 monthly data points. Use this chart to identify performance trends, seasonal patterns, or the impact of creative changes.
4

Review the Audience Chart

The UsersChart renders a donut chart that divides your audience into 4 segments, showing both raw counts (userStats) and percentage shares (userPercentage). Use this visualization to understand which audience groups are most engaged with your campaign.

CTR Chart

The CTR Chart (CtrChart) is a line chart displaying monthly click-through rate values.
  • X-axis — 12 monthly time periods
  • Y-axis — CTR percentage value
  • Data source — The ctr: number[] array from the selected campaign entry in campaignsCtr (lib/data.ts), containing exactly 12 values
  • Interactivity — Tooltips on hover, smooth curve rendering, and responsive resizing

Audience Chart

The Audience Chart (UsersChart) is a donut chart visualizing audience segment distribution.
  • Segments — 4 audience categories displayed as donut slices
  • Labels — Each slice shows both a raw user count and a percentage share
  • Data source — The userStats: number[] (raw counts) and userPercentage: number[] (percentage shares) arrays from the selected campaign entry in campaignsCtr

Analytics Data Structure

The data consumed by both charts follows the CTRType shape defined in lib/data.ts.
type CTRType = {
  id: string;
  title: string;
  ctr: number[];            // 12 monthly CTR values, one per time period
  userStats: number[];      // 4 audience segment raw counts
  userPercentage: number[]; // 4 audience segment percentages (sum to 100)
};
Each entry in the campaignsCtr array corresponds to one campaign. When you select a campaign from the dropdown, the analytics page looks up the matching entry by title, then passes ctr, userStats, and userPercentage as props to the two chart components.
Analytics data is currently seeded from static values in lib/data.ts. Figures shown in the charts do not yet reflect real-time ad serving data. Integrating live campaign metrics would require a backend analytics pipeline — for example, incrementing impression and click counters on each ad serve event and aggregating them into monthly buckets before surfacing them through an analytics API endpoint.

Build docs developers (and LLMs) love