This guide will walk you through how to set up custom Cost per Lead reporting using formula fields in HubSpot’s custom report builder.
Cost Per Lead (CPL) is a key metric for measuring marketing efficiency. In HubSpot, CPL is automatically calculated within the campaign metrics dashboard for each campaign:
Use the Contact lifecycle cost report to analyse the cost per lifecycle stage based on the count of influenced contacts and your campaign's spend. More info here: Analyse your contact lifecycle cost
However, this approach is limited to individual campaigns. To gain a broader view of CPL across all marketing efforts, a custom approach using formula fields in custom reports (Beta) can be implemented.
Step 1: Start your report
-
Navigate to Reports > Reports > Create Report.
-
Select Custom Report Builder.
-
Choose Contacts as the primary data source.
-
Select Campaigns as an additional data source.
Step 2: Create custom formula fields
NOTE - You'll need to opt into the product update 'Formula Fields now in Custom Report Builder' for this part of the hack.
Formula 1: Count the number of leads
Create a formula field that calculates the total number of leads:
COUNT([CONTACT.hs_object_id])
Apply filters to refine the leads included (e.g., timeframe, lead source, or lifecycle stage).
Formula 2: Calculate Cost Per Lead
Create a formula field that calculates the CPL.
In the example below this has been done via dividing total campaign spend by the number of leads (as calculated in the first formula field above):
SUM([P-CAMPAIGNS.CAMPAIGN/hs_spend_items_sum_amount]) / [Count of leads]
However, you can adapt this to pull in the cost of lead generation from within another relevant property in your HubSpot portal or by manually inputting it into the formula itself.
Again, add any filters to niche down the dataset you are calculating CPL for. This could include:
-
Timeframe: Filter by date to analyse CPL over specific periods.
-
Campaigns: Include all campaigns or filter by specific ones.
-
Lead source: Segment CPL by organic, paid, referral, or other lead sources.
Step 3: Visualise & analyse your CPL data
-
Add visualisations such as bar charts, line graphs, or tables to display trends.
-
Save and share the report with relevant teams.
-
Use insights to optimise marketing spend and improve ROI!