The Analytics page atDocumentation 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.
/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
Navigate to Analytics
Open the Advertiser portal sidebar and click Analytics, or go directly to
/advertiser/analytics.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.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.
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 incampaignsCtr(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) anduserPercentage: number[](percentage shares) arrays from the selected campaign entry incampaignsCtr
Analytics Data Structure
The data consumed by both charts follows theCTRType shape defined in lib/data.ts.
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.