Cost per lead by channel
“calculate cost per lead by channel each month from ad spend and new leads by source”
Calculate cost per lead by channel each month from HubSpot ad spend by channel and HubSpot new leads by source, using HubSpot source to channel map.
What the agent built
7 steps, each one an ordinary Mammoth step you can open and change.
- FileHubSpot ad spend by channelCSV export · 24 rows
- FileHubSpot new leads by sourceCSV export · 26 rows
- FileHubSpot source to channel mapCSV export · 6 rows
- StepTotal spend by monthStep 5
- StepMake source key (New leads)Step 2
- StepMake source key (Source map)Step 1
- JoinAdd mapped channels24 of 26 paired
- StepTotal leads by monthStep 4
- JoinMatch monthly channels24 of 24 paired
- StepCalculate cost per leadStep 7
- ResultMonthly Channel Lead Cost25 rows
- ScheduleRuns when you sayProposed
Checked on the sample files: every step ran, 25 rows came out, and the join paired 24 of 26 rows; the join paired 24 of 24 rows.
- Download HubSpot ad spend by channel sample (24 rows)HubSpot: Advertising > Ads > Export
- Download HubSpot new leads by source sample (26 rows)HubSpot: Reports > Analytics Tools > Traffic Analytics / Attribution > Export contacts created by source
- Download HubSpot source to channel map sample (6 rows)HubSpot: Settings > Properties > Source mapping sheet used by the reporting team
What you get back
The result of that run, the rows to look at first.
| Channel | Month | Cost per lead | Ad spend | New leads |
|---|---|---|---|---|
| direct | 2026-08-01 | 0 | 0 | 19 |
| display | 2026-08-01 | 68.42 | 2,600 | 38 |
| organic_social | 2026-08-01 | 0 | 0 | 52 |
| paid_search | 2026-08-01 | 50.62 | 8,200 | 162 |
| paid_social | 2026-08-01 | 44.63 | 5,400 | 121 |
| partner | 2026-08-01 | 34.15 | 1,400 | 41 |
| referral | 2026-08-01 | 0 | 0 | 34 |
| display | 2026-09-01 | · | 2,800 | 0 |
| organic_social | 2026-09-01 | 0 | 0 | 58 |
| paid_search | 2026-09-01 | 52.30 | 9,100 | 174 |
| paid_social | 2026-09-01 | 42.96 | 6,100 | 142 |
| partner | 2026-09-01 | 38.46 | 1,500 | 39 |
How do you calculate cost per lead by channel each month?
Export your ad spend by channel, new leads by source, and source to channel map from HubSpot. The workflow matches the source keys, adds the mapped channel, totals spend and leads by month, then calculates cost per lead for each channel. You get monthly channel cost per lead as the result.
How it works
How to use the Monthly Channel Lead Cost workflow
- 1Get early accessWe invite people in small batches, job by job. You'll land on this workflow, already built and checked on the sample files.
- 2Swap in your exportsUpload your own files as they come out of your tools. The agent checks the workflow on your rows.
- 3Change it in words, then turn it onSay what to change and see the new result before anything saves. Then choose when it runs.
Monthly Channel Lead Cost: questions
What export should you use?
What happens to rows that do not match?
How do you change the rules?
Get early access to this workflow
It will open already built and checked on the sample files. Swap in your own exports and see your result.
Workflows like this
Decide which pages to keep, update or prune, and find the search terms that spend without converting.
- ROAS by campaignCalculate ROAS by campaign from Google Ads and Shopify exports, matched by week and utm campaign.See the workflow Built by the agent
- Content auditEvery page's clicks now and before, and a keep, update or prune callSee the workflow Template
- Google Ads wasted spendFind search terms with spend and no conversions in the last 30 days, ranked by spend, from a Google Ads export.See the workflow Built by the agent
- Keyword rankings changeCompare this month's average position with last month from Search Console and see which keywords moved up or down in a keyword ranking report.See the workflow Built by the agent
- Negative keyword finderEvery search term that spent money and never converted, with its share of spendSee the workflow Template
- Marketing ROI by campaignCalculate marketing ROI for each campaign from HubSpot exports, using won deal revenue and campaign spend.See the workflow Built by the agent