AI Stack for Marketing Attribution

Salesforce + GA4 + Marketo → Claude → Sheets + Dashboard
Matt Danese
Senior Demand Generation Manager. These stacks are built and used in production — not generated for a listicle.

Most B2B attribution is incomplete — it either lives entirely in the ad platform, which overcounts conversions by taking credit for every touchpoint, or entirely in Salesforce, which undercounts by only seeing the last touch before conversion. This stack connects all three attribution sources — web sessions from GA4, campaign influence from Marketo, and opportunity data from Salesforce — and runs the aligned dataset through an attribution audit prompt. The output is a defensible attribution model that shows which channels are actually generating pipeline.

The Stack

Input
Salesforce GA4 Marketo
AI
Claude
Output
Google Sheets Dashboard

The Prompt

This stack is built around the Attribution Audit Diagnostic Prompt. Here's the abbreviated version — the full prompt with all variables and usage notes is on its own page.

Claude Prompt — Abbreviated
You are a B2B marketing attribution specialist building a multi-touch attribution model.

Review the three-source dataset provided: Salesforce opportunity data, GA4 session data, and Marketo campaign influence.
Identify the top 5 touchpoint sequences that appear most frequently in the paths leading to closed-won deals.
Flag channels with high session volume but low opportunity influence — potential attribution gaps.
Recommend a credit allocation model (first-touch, last-touch, linear, or time-decay) with justification based on the data.
Output a structured attribution summary with confidence levels by channel.
[ ... continued — see full prompt ]

The Workflow

  1. Export Salesforce opportunity data

    Pull all opportunities created and closed in the attribution window — including lead source, campaign influence, and UTM data captured at conversion.

  2. Export Marketo campaign influence

    Export campaign influence data from Marketo — which programs touched each opportunity and at what stage, with engagement dates.

  3. Export GA4 session paths

    Pull session data from GA4 for the same period — source/medium, channel grouping, and any assisted conversion data available in the attribution reports.

  4. Align and cross-reference

    Map Marketo program names to GA4 source/medium labels and Salesforce campaign names. Build a unified dataset that shows the full touchpoint path for each opportunity.

  5. Run the attribution audit

    Paste the aligned dataset into the Attribution Audit Diagnostic prompt. Claude identifies top touchpoint sequences, attribution gaps, and recommends a credit model. Export the output to Sheets as your attribution model.

What This Replaces

Related Stacks

New stacks drop weekly.

Each one includes the tools, the Claude prompt, and the workflow logic. Free — built for in-house B2B demand gen managers.

← Back to Stack Library

© 2026 The Demand Engineer · thedemandengineer.com