Attribution

By Syncfusion®, Inc. · Last updated

A later step: attribution models and their trade-offs for long B2B sales cycles, and how to build your own analysis with an LLM.

What you will learn

  • Compare attribution models for long sales cycles
  • Join ad, analytics and CRM exports
  • Use an LLM to write attribution queries and scripts

Do this once campaigns are running Attribution needs data: at least a month of campaigns with GCLIDs and UTMs saved on leads, and some leads that have moved through your sales stages. If you're in your first week, go back to the Quick start. Come back here in month two or three.

At a glance

Attribution decides which touch gets credit for a deal. No model is "true"; each answers a different question. In Google Ads, use data-driven attribution (the default) for bidding. For budget decisions across channels, build your own view from exported data. B2B deals take weeks or months and involve several people, so ad-platform reports undercount what ads contributed and overcount what they caused. Use CRM outcomes, not platform conversions, as the end point. Add a "How did you hear about us?" field. Self-reported attribution catches word of mouth, podcasts and communities that no tracking sees. Your LLM can join Google Ads, GA4 and CRM exports and write the script that produces the report. You check the joins and the logic.

The models, briefly

Model Gives credit to Good for Misleads when

Last click The last ad click (or last non-direct visit in GA4) before converting Simple, easy to explain, matches what sales sees Brand search and retargeting look great; whatever created the demand looks worthless

First touch The first recorded visit or click Seeing which channels bring new people in Ignores everything that moved the deal forward

Position-based (U-shaped) 40% first, 40% lead-creating touch, 20% spread across the middle A balanced default for B2B reporting you build yourself The weights are arbitrary; treat it as a convention, not a measurement

Data-driven (Google Ads, GA4) Touches, based on comparing paths that converted with paths that didn't Bidding inside Google Ads; it's the default It only sees Google's touchpoints and the conversions you send it; it can't see sales calls, events or referrals

Self-reported Whatever the buyer says brought them Catching word of mouth, podcasts, communities, AI assistants People forget and simplify; use it alongside tracked data

Google Ads now offers only data-driven and last click; the older rule-based models (first click, linear, time decay, position-based) were removed in 2023. GA4 works the same way. If you want first touch or position-based, you build it yourself from exported data, which this lesson shows. As of October 2026

Why B2B makes this hard

A typical path for a mid-size deal: someone hears about you in a community thread, searches your category weeks later and clicks an ad, reads two pages, leaves. A colleague later searches your brand name, clicks the brand ad and requests a demo. Sales runs a six-week cycle with three more people. Last click credits the brand ad. First touch credits the category ad. Neither sees the community thread or the sales work.

Three practical consequences:

Judge on pipeline, not platform conversions. The end point of your analysis should be CRM opportunities and revenue, joined to how each lead arrived. Separate brand from non-brand. Brand search mostly captures demand created elsewhere. Report it separately so it doesn't flatter non-brand campaigns or get cut as "too cheap to matter". Accept ranges. If last click says non-brand Search produced 20% of pipeline and first touch says 35%, the honest answer is "somewhere in that range". That's enough to make a budget decision.

Add a "How did you hear about us?" field

It takes ten minutes and catches what tracking misses. Make it a free-text field (not a dropdown, which biases answers), optional, on the demo or sign-up form. Have your LLM categorise the answers monthly. Expect a large share of "Google" answers; that's useful in itself when you compare it with tracked paid search leads.

Build your own attribution analysis with an LLM

You don't need an attribution tool to start. Three exports and an LLM that can run code are enough.

1. Export the data

Source Export Key columns

CRM All leads created in the last 6 to 12 months, with current stage Lead ID, email or domain, created date, GCLID, UTM fields, "how did you hear" answer, stage, opportunity amount, close date, region

Google Ads Campaign report by day (or click report for the last 90 days if you want GCLID-level detail) Date, campaign, ad group, cost, clicks, conversions; GCLID in the click performance report

GA4 Exploration with first user source/medium/campaign and session source/medium/campaign for converting users, by date Date, first-user source/medium/campaign, session source/medium/campaign, key events

The join key is the GCLID and UTMs saved on each lead (that's why stage-one tracking saves them). GA4's free exports don't include user-level IDs, so you join GA4 at the campaign and date level, not per lead.

2. Ask the LLM to build the analysis

Build a first-touch vs last-touch pipeline report

3. Check the result before you trust it

Row counts: does the number of leads match the CRM? Did the join drop rows? Spot-check five leads by hand: is the channel right? Totals: does Google Ads cost in the report match the Google Ads interface for the same dates? Small numbers: a campaign with 3 opportunities isn't "the best campaign". Ask the LLM to flag anything below 10 SQLs as directional.

What the output looks like

An illustrative summary for a six-month window (not a benchmark):

Channel (first touch) Leads SQLs Pipeline Ad cost Pipeline ÷ cost

Paid Search Non-brand 410 62 $1,240,000 $96,000 12.9×

Paid Search Brand 180 48 $1,010,000 $9,000 112×

Organic 520 71 $1,420,000 – –

Referral / word of mouth 90 30 $780,000 – –

Reading it: brand search looks extraordinary, but it mostly captures people who already know you. Non-brand search at 12.9× pipeline to cost is the number that tells you whether to put more money into Search. Compare it with your target return (see Budget decisions).

Starter budget: keep it simple With a few dozen leads a month, a monthly spreadsheet is enough: leads, SQLs and pipeline from paid search (GCLID present) compared with cost. Run the prompt above quarterly rather than monthly; with small numbers, monthly changes are mostly noise.

Intermediate budget Run the analysis monthly and keep the script in a shared folder or repository. Add a position-based view once you capture both first and last touch in the CRM (most CRMs can store "original source" and "latest source").

Advanced budget Move the joins into a warehouse (BigQuery has free Google Ads and GA4 export connectors; GA4's BigQuery export includes event-level data). Ask your LLM to write the SQL views instead of a Python script, and schedule them. Consider incrementality tests (geo holdouts or campaign experiments) for big budget questions; attribution shows correlation, a holdout shows what the ads caused.

Write SQL views for attribution in BigQuery

Go deeper Data-driven attribution in Google Ads: what to know

Data-driven attribution (DDA) is the default for new conversion actions. It spreads credit across Google ad interactions (Search, YouTube, Display) based on patterns in your account. It matters mainly for bidding: with DDA, Smart Bidding values upper-funnel clicks a bit more than with last click. Keep DDA on your conversion actions unless you have a specific reason to change it. Just don't read Google Ads' conversion columns as a cross-channel truth. They only see Google touchpoints and only what you upload.

Limits of LLM-built analysis LLMs write good join and aggregation code, but they will also happily join on the wrong key, silently drop rows with missing values, or describe a pattern in 4 data points as a trend. Always ask for row counts before and after each step, read the code's join conditions, and spot-check results against the source systems. Don't paste personal data you aren't allowed to share; remove names and emails (keep a hashed ID) if your policy requires it.

Check yourself

Do this now

Add an optional free-text "How did you hear about us?" field to your forms. Export CRM leads, the Google Ads campaign report and GA4 acquisition data for the last 3 to 6 months. Run the attribution prompt and check row counts and five leads by hand. Report brand and non-brand Search separately from now on. Save the script and schedule the analysis monthly (Intermediate/Advanced) or quarterly (Starter).

Next: Performance Max and YouTube