Recovering Multi-Channel Attribution for a $50M+ Telehealth Clinic by Re-Engineering API Ingestion
A flawed custom ERP sync destroyed marketing attribution for a telehealth provider, stamping 160,000+ records with a generic API label. We re-engineered the API ingestion to parse granular source data before it reached the CRM, which restored native multi-channel reporting and let the clinic move 12% of its budget to the campaigns that were performing.
Executive Summary
Context
A high-volume telehealth clinic generated thousands of monthly leads. A poorly configured sync with its legacy ERP universally overwrote HubSpot's standard "Original Source" property with "API." Roughly 2/3 of the clinic's paid leads came from Facebook and 1/3 from Google, and the label turned all of them into unreportable filler.
What We Built
We redesigned the integration point between the legacy ERP and HubSpot so attribution data gets custom-parsed at ingestion. We also built a unified reporting framework that connects external ad performance directly to closed deals, giving the clinic cross-channel velocity tracking for the first time.
Tech Stack
- HubSpot Reporting & Operations Hub Enterprise
- Custom legacy ERP
- Facebook Ads API / Google Ads API
- Google Data Studio (Displaced)
- BigQuery (Displaced)
Not a fit if paid spend runs through a single channel, since there is no cross-channel split for corrected attribution to reveal. It also depends on a legacy system sitting between your ad platforms and HubSpot that is already overwriting source data at the point of ingestion; without that specific failure point, there is nothing here to re-engineer.
The Challenge
The clinic was spending heavily on Facebook and Google Ads, yet the HubSpot portal reported nearly every lead as coming from API. The custom integration with the legacy ERP was overwriting HubSpot's native Original Source property as data flowed in, and it had reduced roughly 160,000+ records to that same generic label. The valid attribution data still existed, buried in raw contact activity objects, but it never reached a reportable property.
With no way to see which channels drove revenue, the marketing team fell back on manual workarounds. Data hygiene alone consumed more than 10 hours a week, and the external reporting in Data Studio and BigQuery never reconciled with the CRM.
Our Approach
Fixing the reports would not have fixed the problem. The data itself needed correcting at the source, the API ingestion point, rather than through more manual cleanup after the fact. We added custom properties, redesigned the API endpoint payload mapping, and wrote new logic that intercepts the generic incoming data and parses out the actual source. It separates Facebook (roughly two-thirds of paid leads), Google Search (roughly one-third), and internal campaigns programmatically.
We also standardized HubSpot's tracking URL parameters so web traffic maps correctly to source reports. One more disconnect surfaced during the work: HubSpot campaigns showed no attributed revenue because sales deal amounts were tracked inconsistently. We unified the revenue reporting framework to connect ad spend directly to closed deal data, and cross-channel velocity became visible for the first time.
This engagement is part of our reporting + analytics work for healthcare & wellness organisations.
Impact
12% Budget Reallocation to High-Performing Campaigns
Clean data infrastructure delivered real cross-channel velocity. Underperforming campaigns became easy to spot, and ad spend shifted to higher-ROI channels with confidence.
Saving 10+ Hours Per Week on Manual Data Cleaning
The recursive cleanup ended. Fixing the data at the API ingestion point meant marketing operations no longer manually cleaned and reconciled data across external tools like BigQuery.
Cross-Channel Velocity Transparency
External ad performance now connects directly to closed CRM deals. The reporting architecture covers the entire funnel, from impression to prescription.
Displacement of Fractured Reporting Stacks
HubSpot's native reporting became usable again. The client dropped the disjointed Google Data Studio dashboards and centralized commercial intelligence inside the CRM.
The redesigned integration endpoint accepts customized JSON payloads from the legacy ERP. The system programmatically parses source markers (e.g., 'fb_paid') within each payload and populates custom HubSpot attribution properties. Generic "API" labeling can't happen anymore.
We enforced rigid standardization for all inbound marketing links using HubSpot's Tracking URL Builder. Traffic from every source now maps accurately to HubSpot's native sources reports for proper segmentation.
Sales deal amounts had no connection to marketing assets. We closed that gap with a unified reporting framework that ties ad spend data to CRM deal amounts directly, and native campaign revenue attribution now works.
Operations Hub features format and validate data as it enters the portal via API. The cleansing is proactive. Standard and custom reporting properties get clean, standardized values before any automation or reporting logic touches them.
The custom ERP sync used to overwrite HubSpot's "Original Source" property, so roughly 160,000+ records read as API. The real source data sat unreported in raw contact activity objects. Now new logic at the ingestion point intercepts the generic payload and parses out Facebook, Google Search and internal campaigns before the record reaches HubSpot. The clinic then moved 12% of its budget to the campaigns that were performing.
FAQ
Data Studio is a visualization layer. It can't fix data quality problems in the underlying CRM. The client had data in BigQuery, but it was disjointed from the CRM's operational reality. Fixing the data at the API ingestion point made HubSpot's native multi-channel reports usable again, and the commercial team started working from the same operational data as sales and clinical staff.
A "fail-safe" runs inside the custom API payload parsing. When the integration can't confidently map incoming data to a specific paid source like Facebook or Google, it defaults the record to a cleaner "Offline Sync" category. It also flags the record for operational review, so nothing gets buried under a generic "API" label.