Blog · B2B attribution for small teams

Attribution in a spreadsheet: a monthly routine without a tool

A first-touch marketing attribution spreadsheet built from two HubSpot exports: the columns, the formulas, a monthly routine, and where it stops being honest.

Kurt Kalwin6 min read

A marketing attribution spreadsheet needs two HubSpot exports a month and about six formulas. Export the deals created last month with their associated contacts, export those contacts with their Original Traffic Source, then credit each deal to the source of its earliest-created contact. That gives you first-touch pipeline and revenue by channel in under an hour. It breaks on webinars, offline contacts and deals with no contacts, and I will say where.

What the sheet answers, and what it doesn't

The sheet answers one question: of the pipeline created this month, which channel found the people behind it? That is first-touch, deal-level attribution, and it is the sourcing number most small teams are asked for. The post on what pipeline attribution is sets out why that number, plus pipeline and revenue, is the minimum worth reporting.

It does not answer "did the webinar help?" A contact who came from paid search and then attended three webinars is a paid search deal in this sheet. If you need the influenced view as well, keep it as a separate count, the way the post on sourced vs influenced pipeline describes. Mixing the two in one column is how marketing ends up claiming 140% of pipeline.

The two exports

Both come from HubSpot's index pages. HubSpot's page on exporting records says that by default only the properties and associations in your view go into the file, and that you can customise the export to include all properties and associations instead. It also says the download link arrives by email and expires after 30 days, and it recommends CSV because the Excel formats cap the number of columns.

Export one: deals. Build a saved deals view filtered to Create date in last month, with these columns showing, then export it:

  1. Deal name
  2. Amount
  3. Create date
  4. Close date
  5. Is Closed Won
  6. Associated contacts

HubSpot's default deal properties page defines Amount as the total value of the deal in the deal's currency, and Is Closed Won as true when the deal is in the closed won state. It also notes that users can edit a deal's Create date by hand, which matters later. The export page says association columns carry up to 1,000 associated record IDs per column by default, which is far more contacts than any real deal has.

Export two: contacts. Export a contacts view with Record ID, Email, Create date, Original Traffic Source and Original Traffic Source drill-down 1. HubSpot's default contact properties page describes Record ID as the contact's unique identifier and Create date as the date the contact was created in your account, both set automatically. I export all contacts rather than filtering, because a deal created in October often belongs to a contact from last year.

The columns and formulas

Paste each export into its own tab, named deals and contacts. In contacts, put Record ID in column A, Create date in C and Original Traffic Source in D. In deals, Amount sits in B and the associated contact IDs in F.

The association column puts several IDs in one cell when a deal has several contacts. Open the CSV once, look at the separator between IDs, and use it in the first formula. These formulas work in Google Sheets and in current Excel.

  1. In H2, split the IDs across columns: =SPLIT(F2, ";") in Google Sheets, or =TEXTSPLIT(F2, ";") in Excel, replacing the semicolon with your file's separator. Leave H to L free for up to five contacts.
  2. In M2, look up the first contact's create date: =IFERROR(XLOOKUP(H2, contacts!$A:$A, contacts!$C:$C), ""). Fill it right to Q2, so each ID in H to L gets its date.
  3. In R2, find the earliest date: =MIN(M2:Q2).
  4. In S2, find the contact that date belongs to: =INDEX(H2:L2, MATCH(R2, M2:Q2, 0)).
  5. In T2, look up that contact's source: =XLOOKUP(S2, contacts!$A:$A, contacts!$D:$D, "No contact").
  6. Fill H2 to T2 down to the last deal.

Then add a summary tab with one row per Original Traffic Source value. HubSpot's page on traffic source properties lists them: Organic search, Paid search, Organic social, Paid social, Email marketing, Referrals, Direct traffic, AI Referrals, Other campaigns and Offline sources. Add a row for "No contact" too. With the source name in A2:

  • Deals sourced: =COUNTIFS(deals!$T:$T, A2)
  • Pipeline sourced: =SUMIFS(deals!$B:$B, deals!$T:$T, A2)
  • Won revenue to date: =SUMIFS(deals!$B:$B, deals!$T:$T, A2, deals!$E:$E, "true")

Check how Is Closed Won comes out in your file before you trust the third formula. If the export writes it as TRUE or Yes, match that instead.

A worked example for one month

The figures here are hypothetical. Say six deals were created in October, worth 108,000 dollars in total. After the formulas run, the summary looks like this:

Original Traffic Source Deals Pipeline Won to date
Paid search 2 36,000 dollars 12,000 dollars
Organic search 1 24,000 dollars 0 dollars
Offline sources 2 30,000 dollars 0 dollars
No contact 1 18,000 dollars 0 dollars

Read the bottom two rows first. Half of October's deals, and 48,000 dollars of the pipeline, sit in rows that tell you nothing about a channel. That is normal for a first run, and it is the most useful thing the sheet shows you: the gaps in your data, in dollars.

The "No contact" row is a sales process problem. Send the deal names to whoever owns the deals and ask them to associate a contact. The Offline sources rows need a closer look, which the next section covers.

Where the spreadsheet breaks

It breaks on webinars first. Original Traffic Source records the first known web source, so a contact created by a Zoom import or the Zoom integration usually lands in Offline sources, because HubSpot's tracking code does not run on zoom.us. The sheet then shows your best webinar as "Offline sources". The post on Original Source and webinars explains the mechanics.

The fix is a separate contact property for the first webinar a contact registered for, added as one more column in the contacts export, and used in T2 whenever the source is Offline sources. You can fill that property with your own import routine or with a tool such as Connexa, which credits each contact to the first webinar they registered for.

It breaks on edits. HubSpot's traffic source page says you can change Original Traffic Source manually, and the deal properties page says the same of a deal's Create date. Someone tidying records in December can move an October deal into November or change its source, and your sheet will disagree with last month's report. I would accept that rather than chase it.

It breaks on picking the earliest contact. The earliest-created contact is a proxy for the first touch, and a poor one when sales adds a colleague who was in HubSpot for years before the deal existed. If a row looks wrong, open the deal and decide by hand. Write down that you did.

It breaks quietly on volume. At around fifty deals a month the hand checks above start taking longer than the formulas save, and that is the point to look at HubSpot's own attribution reports or a tool. Below that, the spreadsheet is honest and cheap.

The monthly routine

I would run this on the first working day of each month, and keep it to the same five steps every time:

  1. Export last month's deals from the saved view, and all contacts from the saved contacts view.
  2. Copy last month's workbook, paste the new exports over the deals and contacts tabs, and fill the formulas down.
  3. Fix the "No contact" deals you can, and note the rest.
  4. Look at every Offline sources deal and fill the first webinar column where it applies.
  5. Freeze the summary as values in a tab named for the month, so later edits in HubSpot don't rewrite history.

Keep the frozen monthly tabs side by side and you have a trend line without a tool. Update the "won to date" figures once a quarter by rerunning the deals export for older months; the sourcing column should not change, and if it does, someone edited a record. The post on first-touch vs multi-touch covers when this simple model stops being enough.