FB API Tester
Home
App: 4421601914796284
or paste token:
Ad Accounts
Loading...
Campaigns
Select an ad account first
Loading...
Ad Sets
Select an ad account first
Loading...
Ads
Select an ad account first
Loading...
Ad Creatives
Select an ad account first
Loading...
Insights
Select an ad account first
Loading...
Audiences
Select an ad account first
Loading...
Targeting Search
Custom API Call
Loading...
Select an ad account first
Loading...
Reach
-
Impressions
-
Frequency
-
Loading chart...
Campaign Breakdown
Reach values cannot be summed across campaigns (overlapping audiences) Loading...
Incremental Reach Analysis
\u24D8
Values shown are estimated based on Facebook's sampling methodology and our incremental reach calculation. They provide directional guidance, not exact measurements.
Loading incremental reach...
Architecture Overview
Tech Stack
Vanilla JS, HTML5, CSS3 — zero framework, zero build step. Single index.html (~2400 lines).
External Dependencies
Chart.js 4.5.0 (CDN), chartjs-adapter-date-fns 3.0.0, chartjs-plugin-annotation, Facebook JS SDK.
State Management
window.appState — ephemeral, session-only. Password gate via sessionStorage. No persistent client state.
API Layer
fetchGraph() — central wrapper for all Facebook Graph API v21.0 calls with error handling and toast notifications.
Security
Safe DOM via el() builder (no innerHTML for user data). HTML escaping. Password gate for access control.
Testing
Playwright E2E — 132 tests across 8 spec files. TypeScript test layer with page object patterns.
Version History
v0.4.0
2026-03-09
Done
Incremental Reach Analysis
- Cumulative Reach: Expanding time window technique showing total unique accounts reached over time
- Incremental Reach: Week-over-week, month-over-month, and quarterly new unique accounts per period
- Per-Campaign Estimation: Proportional allocation heuristic estimating which campaigns drove new reach
- Saturation Detection: Warning indicator when frequency rises while incremental reach flattens
- Estimation Disclaimers: Info icons, tooltips, and disclaimer banners clarifying all values are approximations
- E2E Tests: Comprehensive Playwright test coverage for all dashboard functionality (Phases 1-3)
v0.3.1
2026-03-09
Done
Default Account Auto-Selection
- Default account: Snuggs NL EUR (act_1168585726929557) auto-selected on load
- Status message: Inline confirmation when account auto-loads
v0.3.0
2026-03-09
Done
System User Auto-Loading
- Auto-load: Token from defaults.json loaded on app start
- Fallback: System user assigned_ad_accounts endpoint when me/adaccounts empty
- Accounts: 5 Snuggs ad accounts (AT, CZ, DE, NL, SK) as defaults
- Docs: specs/facebook-api-access.md, workflows/token-setup.md
v0.2.0
2026-03-09
Done
Reach Metrics and Visualization
- Dashboard: Dashboard view with hash routing, date range picker, campaign filtering
- Reach: Account-level deduplicated reach display for custom date ranges
- Charts: Time-series reach trend chart with Chart.js 4.5.0, dark theme
- Period Toggle: Daily, weekly, monthly views via API time_increment
- Campaign Breakdown: Per-campaign reach, impressions, frequency, spend table
- Combined View: Multi-axis chart showing reach + impressions (left) and frequency (right)
- Efficiency: Cost Per Reach and Reach Per Dollar metric cards
v0.1.0
2026-03-09
Done
Facebook API Tester
- Core: Password-gated access to Facebook Graph API explorer
- Auth: Facebook OAuth login via SDK + manual access token input
- Browse: Ad accounts, campaigns, ad sets, ads, custom audiences
- Data: Insights retrieval (impressions, reach, spend, frequency)
- UI: Dark theme, tabbed navigation, breadcrumb drill-down, JSON viewer
Roadmap — v2 Planned
Infrastructure
INFRA-01Automated collection — scheduled data pullsPlanned
INFRA-02D1 persistence — Cloudflare D1 for historical data storagePlanned
INFRA-03System user tokens — long-lived token managementPlanned
INFRA-04Backfill — historical data import for existing campaignsPlanned
Advanced Analytics
ADV-01CSV export — download reach data and campaign breakdownsPlanned
ADV-02Period comparison — compare metrics across date rangesPlanned
ADV-03Campaign impact attribution — measure incremental lift per campaignPlanned
Resilience
RES-01Metric abstraction layer — decouple from raw API response shapePlanned
RES-02Methodology annotations — document calculation methods inlinePlanned
RES-03Token health — monitor token expiry and permission scopePlanned