Technical Case Study

Cross-Channel Digital Advertising & Lead Analytics Dashboard (Google Ads & Meta Graph API)

  • Home
  • /
  • Portfolio
  • /
  • Cross-Channel Digital Advertising & Lead Analytics Dashboard (Google Ads & Meta Graph API)
Cross-Channel Digital Advertising & Lead Analytics Dashboard (Google Ads & Meta Graph API)

Digital marketing agencies managing campaigns across both Google Ads and Meta (Facebook & Instagram) often face fragmented reporting, inconsistent conversion definitions, and manual spreadsheet overhead. To solve this, Jainbrain Technologies engineered a centralized, white-label Cross-Channel Digital Advertising & Lead Analytics Dashboard for DV8 Communication built on PHP 8 and modern ES6+ JavaScript.

The platform connects directly to the Google Ads API (v24) and Meta Graph API (v19.0), giving agency stakeholders and their end clients a unified, real-time view of impressions, clicks, spend, lead conversions, and cost-per-acquisition metrics—complete with custom period-over-period comparisons and interactive data visualizations.

100%

Native Metric Alignment

< 200ms

Client-Side Recalc

Dual API

Google v24 & Meta v19

REST JSON

X-API-Token Feed

Core Technical Challenges

  • Cross-Platform Schema Normalization: Google Ads returns campaign performance in costMicros and standardized conversion floats, whereas Meta Graph API nests lead data inside complex, multi-layered actions arrays containing overlapping standard events, deduplicated Instant Forms, and custom browser conversions.
  • Preventing Lead Double-Counting & False Positives: Standard Meta API responses return multiple action types for a single user submission (e.g., lead, onsite_conversion.lead_grouped, and custom pixel events). Naive parsing either inflates lead counts or falls back to non-conversion engagement metrics like link clicks.
  • Weighted Ratio Accuracy in Summary Totals: Summing or taking simple vertical averages of percentages (CTR, Conversion Rate) and unit costs (CPC, CPM, Cost/Conv) across campaigns of vastly different sizes distorts account-level ROI.
  • Multi-Tenant Access & Visibility Controls: The agency required granular database-driven controls to isolate client accounts across separate Business Portfolios, toggle specific dashboard columns, and whitelist approved campaigns dynamically.

Solution & System Architecture

We architected a modular multi-tenant reporting engine combining server-side API normalization in CodeIgniter with a responsive Chart.js & Bootstrap 5 analytical workspace:

Unified Cross-Channel Compiler Engine

A modular PHP compiler engine authenticates via OAuth 2.0 refresh tokens for Google Ads and system access tokens for Meta Business Portfolios. When users toggle between Google and Meta channels or select custom comparison windows (Previous Period, Previous Week, Prior Months, or Custom Dates), the engine fetches parallel datasets and normalizes them into a single unified schema.

Intelligent Meta Lead & Conversion Parser

A dedicated action-mapping pipeline inspects Meta insight payloads at the campaign level. The parser isolates root lead events and selectively evaluates custom pixel conversion tags while filtering out page engagements and link clicks—ensuring that both native Facebook Instant Forms and website form submissions map cleanly to Conversions and Cost/Conv.

White-Label Client & Campaign Filtering Layer

Each client profile in MySQL supports independent platform configurations, allowing administrators to map ad accounts across distinct Business Portfolios, whitelist specific campaign names per client, and toggle UI column or chart visibility dynamically.

Interactive Analytics & Weighted Totals

Paired Bootstrap 5 with Chart.js and a custom ES6 JavaScript calculation engine. Whenever users sort columns or filter by performance tiers (High vs. Low CTR), the engine dynamically recalculates grand totals using true weighted formulas (Total Spend ÷ Total Conversions for global Cost/Conv) and updates trend line and distribution pie charts in real time with one-click UTF-8 CSV export.

Key Features Delivered

  • One-Click Channel Switching: Seamless toggling between Google Ads and Meta Ads accounts within a single white-label interface.
  • Period-over-Period Variance Tracking: Automated percentage growth and decline indicators comparing current date ranges against historical benchmarks.
  • Interactive Trend & Share Visualizations: Dynamic Chart.js line graphs and distribution charts driven directly by clicking summary KPI cards.
  • Headless JSON REST API: A dedicated api_get_data endpoint secured via X-API-Token headers for external BI reporting integrations.

Business Impact

  • Eliminated Manual Reporting Hours: Replaced manual CSV exports and spreadsheet reconciliation with automated, live API data streams.
  • 100% Metric Alignment: Matched native ad manager reporting down to the cent across multi-campaign lead generation portfolios.
  • Scalable Multi-Client Architecture: Enabled rapid onboarding of new client ad accounts across multiple Business Portfolios with isolated permissions and custom branding.