← All cases

Google data and integrations

Google Ads, AdSense, GA4, and GAM data integrations and auditing

An engine that read ad revenue, calculated the real value of each conversion, and fed it back to Google Ads to optimize for return — with cross-API auditing because dashboards lie.

5 APIs
Ads, AdSense, GA4, GAM (REST+SOAP), BigQuery
10 accounts
under one MCC
1 rule
audit against the raw API, never the dashboard
Client
Content publisher (contract ended in 2026)
Period
2025–2026
Stack
Google Ads API (GAQL) · AdSense/GA4/GAM · BigQuery · Cloudflare Worker + KV · Mautic

What was built

A Worker that, every 30 minutes, cross-referenced ad revenue with sessions and conversions, calculated the value per page, and sent that value back to Google Ads as a conversion value — so bidding would optimize for return, not clicks. Revenue dashboards, marketing automation integration, and sync to BigQuery.

What was learned — and it’s worth more than the code

  • Audit directly against the APIs, never against processed endpoints or dashboards: I found attribution discrepancies that only showed up when comparing the raw sources.
  • Google API rate limits, quotas, and retry rules are product-specific; ignore them and you get silently throttled.
  • The contract ended with a negative return for the client, and that’s on record: the engine worked, the arbitrage model’s economics didn’t. I’d rather show the case than hide it.

What it’s useful for today

Companies that depend on Google Ads/GA4 and don’t trust their own numbers: reconciliation across sources, a pipeline to BigQuery, and alerts for what doesn’t add up.