# Attribution

Course: [Google Ads for B2B Teams](https://www.devtutorials.ai/learn/google-ads) · Section: Run and Grow
Source: https://www.devtutorials.ai/learn/google-ads/run-and-grow/attribution

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

<div className="gads-callout gads-callout-later">
<p className="gads-callout-title">Do this once campaigns are running</p>
<p>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 <a href="/learn/google-ads/start-here/quick-start">Quick start</a>. Come back here in month two or three.</p>
</div>

<aside className="gads-glance" aria-label="At a glance">
<p className="gads-glance-title">At a glance</p>
<ul>
<li>Attribution decides which touch gets credit for a deal. No model is "true"; each answers a different question.</li>
<li>In Google Ads, use data-driven attribution (the default) for bidding. For budget decisions across channels, build your own view from exported data.</li>
<li>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.</li>
<li>Add a "How did you hear about us?" field. Self-reported attribution catches word of mouth, podcasts and communities that no tracking sees.</li>
<li>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.</li>
</ul>
</aside>

## The models, briefly

<div className="gads-table-wrap">
<table>
<thead>
<tr>
<th>Model</th>
<th>Gives credit to</th>
<th>Good for</th>
<th>Misleads when</th>
</tr>
</thead>
<tbody>
<tr>
<td>Last click</td>
<td>The last ad click (or last non-direct visit in GA4) before converting</td>
<td>Simple, easy to explain, matches what sales sees</td>
<td>Brand search and retargeting look great; whatever created the demand looks worthless</td>
</tr>
<tr>
<td>First touch</td>
<td>The first recorded visit or click</td>
<td>Seeing which channels bring new people in</td>
<td>Ignores everything that moved the deal forward</td>
</tr>
<tr>
<td>Position-based (U-shaped)</td>
<td>40% first, 40% lead-creating touch, 20% spread across the middle</td>
<td>A balanced default for B2B reporting you build yourself</td>
<td>The weights are arbitrary; treat it as a convention, not a measurement</td>
</tr>
<tr>
<td>Data-driven (Google Ads, GA4)</td>
<td>Touches, based on comparing paths that converted with paths that didn't</td>
<td>Bidding inside Google Ads; it's the default</td>
<td>It only sees Google's touchpoints and the conversions you send it; it can't see sales calls, events or referrals</td>
</tr>
<tr>
<td>Self-reported</td>
<td>Whatever the buyer says brought them</td>
<td>Catching word of mouth, podcasts, communities, AI assistants</td>
<td>People forget and simplify; use it alongside tracked data</td>
</tr>
</tbody>
</table>
</div>

<p>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.</p>
<p>If you want first touch or position-based, you build it yourself from exported data, which this lesson shows. <span className="gads-asof" title="Google Ads changes often. Re-check this against Google's help pages.">As of October 2026</span></p>

## Why B2B makes this hard

<p>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.</p>
<p>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.</p>
<p>Neither sees the community thread or the sales work.</p>

<p>Three practical consequences:</p>

<ul>
<li><strong>Judge on pipeline, not platform conversions.</strong> The end point of your analysis should be CRM opportunities and revenue, joined to how each lead arrived.</li>
<li><strong>Separate brand from non-brand.</strong> 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".</li>
<li><strong>Accept ranges.</strong> 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.</li>
</ul>

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

<p>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.</p>
<p>Expect a large share of "Google" answers; that's useful in itself when you compare it with tracked paid search leads.</p>

## Build your own attribution analysis with an LLM

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

### 1. Export the data

<div className="gads-table-wrap">
<table>
<thead>
<tr>
<th>Source</th>
<th>Export</th>
<th>Key columns</th>
</tr>
</thead>
<tbody>
<tr>
<td>CRM</td>
<td>All leads created in the last 6 to 12 months, with current stage</td>
<td>Lead ID, email or domain, created date, GCLID, UTM fields, "how did you hear" answer, stage, opportunity amount, close date, region</td>
</tr>
<tr>
<td>Google Ads</td>
<td>Campaign report by day (or click report for the last 90 days if you want GCLID-level detail)</td>
<td>Date, campaign, ad group, cost, clicks, conversions; GCLID in the click performance report</td>
</tr>
<tr>
<td>GA4</td>
<td>Exploration with first user source/medium/campaign and session source/medium/campaign for converting users, by date</td>
<td>Date, first-user source/medium/campaign, session source/medium/campaign, key events</td>
</tr>
</tbody>
</table>
</div>

<p>The join key is the GCLID and UTMs saved on each lead (that's why <a href="/learn/google-ads/measure-and-protect/tracking#5-save-the-gclid-and-utms-with-every-lead">stage-one tracking</a> 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.</p>

### 2. Ask the LLM to build the analysis

### 3. Check the result before you trust it

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

### What the output looks like

<p>An illustrative summary for a six-month window (not a benchmark):</p>

<div className="gads-table-wrap">
<table>
<thead>
<tr>
<th>Channel (first touch)</th>
<th>Leads</th>
<th>SQLs</th>
<th>Pipeline</th>
<th>Ad cost</th>
<th>Pipeline ÷ cost</th>
</tr>
</thead>
<tbody>
<tr>
<td>Paid Search Non-brand</td>
<td>410</td>
<td>62</td>
<td><span className="gads-money" data-usd="1240000">$1,240,000</span></td>
<td><span className="gads-money" data-usd="96000">$96,000</span></td>
<td>12.9×</td>
</tr>
<tr>
<td>Paid Search Brand</td>
<td>180</td>
<td>48</td>
<td><span className="gads-money" data-usd="1010000">$1,010,000</span></td>
<td><span className="gads-money" data-usd="9000">$9,000</span></td>
<td>112×</td>
</tr>
<tr>
<td>Organic</td>
<td>520</td>
<td>71</td>
<td><span className="gads-money" data-usd="1420000">$1,420,000</span></td>
<td>–</td>
<td>–</td>
</tr>
<tr>
<td>Referral / word of mouth</td>
<td>90</td>
<td>30</td>
<td><span className="gads-money" data-usd="780000">$780,000</span></td>
<td>–</td>
<td>–</td>
</tr>
</tbody>
</table>
</div>

<p>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.</p>
<p>Compare it with your target return (see <a href="/learn/google-ads/measure-and-protect/budget-decisions">Budget decisions</a>).</p>

<div className="gads-var" data-budget="starter">
<div className="gads-callout gads-callout-region">
<p className="gads-callout-title">Starter budget: keep it simple</p>
<p>With a few dozen leads a month, a monthly spreadsheet is enough: leads, SQLs and pipeline from paid search (GCLID present) compared with cost.</p>
<p>Run the prompt above quarterly rather than monthly; with small numbers, monthly changes are mostly noise.</p>
</div>
</div>

<div className="gads-var" data-budget="intermediate">
<div className="gads-callout gads-callout-region">
<p className="gads-callout-title">Intermediate budget</p>
<p>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").</p>
</div>
</div>

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

</div>
</div>

<details className="gads-deeper">
<summary><span className="gads-deeper-tag">Go deeper</span> Data-driven attribution in Google Ads: what to know</summary>
<div className="gads-deeper-body">
<p>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.</p>
<p>It matters mainly for bidding: with DDA, Smart Bidding values upper-funnel clicks a bit more than with last click.</p>
<p>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.</p>
</div>
</details>

<div className="gads-callout gads-callout-llm">
<p className="gads-callout-title">Limits of LLM-built analysis</p>
<p>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.</p>
<p>Always ask for row counts before and after each step, read the code's join conditions, and spot-check results against the source systems.</p>
<p>Don't paste personal data you aren't allowed to share; remove names and emails (keep a hashed ID) if your policy requires it.</p>
</div>

<section className="gads-donow" aria-labelledby="donow-attribution">
<h2 id="donow-attribution">Do this now</h2>
<ul className="gads-checklist" data-module="attribution">
<li data-id="field">Add an optional free-text "How did you hear about us?" field to your forms.</li>
<li data-id="exports">Export CRM leads, the Google Ads campaign report and GA4 acquisition data for the last 3 to 6 months.</li>
<li data-id="run">Run the attribution prompt and check row counts and five leads by hand.</li>
<li data-id="brand">Report brand and non-brand Search separately from now on.</li>
<li data-id="save">Save the script and schedule the analysis monthly (Intermediate/Advanced) or quarterly (Starter).</li>
</ul>
</section>

Next: **Performance Max and YouTube**
