Prompt

How do I build an attribution model for campaigns across paid search, paid social, and email?

Technology / Web Analytics1 observationLast seen Oct 30, 2026

Latest observation

Oct 30, 2026OpenAI APIWeb search: off

To build an attribution model across paid search, paid social, and email, start by deciding what question you want the model to answer, then choose a method that matches your data quality and business needs.

1) Define the goal

Common goals are:

  • Reporting: show how channels contribute to conversions
  • Budget allocation: decide where to spend more
  • Optimization: understand which campaigns assist vs. close conversions

Also define:

  • Conversion type: purchase, lead, signup, etc.
  • Lookback window: e.g. 7, 30, or 90 days
  • Attribution unit: user, session, or order
  • Channels to include: paid search, paid social, email, plus direct/organic if needed

2) Collect the right data

You need journey-level data with at least:

  • user_id or anonymous ID
  • timestamp
  • channel
  • campaign
  • source / medium
  • touchpoint type (click, impression, open)
  • conversion event
  • revenue or conversion value

Helpful extras:

  • device
  • geo
  • audience/segment
  • first-party identifiers
  • UTMs
  • email send/open/click data
  • ad platform click IDs if available

3) Build a unified touchpoint table

Create one table where each row is a touchpoint:

user_idtimestampchannelcampaignevent_typevalue
1232026-01-01 09:00Paid SearchBrandclick0
1232026-01-02 10:00EmailPromo Janclick0
1232026-01-03 14:00Paid SocialRetargetingclick0
1232026-01-03 14:20ConversionPurchaseconversion120

Then sort by time and link touchpoints to conversions within the lookback window.

4) Choose an attribution model

There are several options:

A. Rules-based models

Good for a simple starting point.

  • Last-touch: all credit to the final touch before conversion
  • First-touch: all credit to the first interaction
  • Linear: equal credit to every touch
  • Time decay: more credit to touches closer to conversion
  • U-shaped / position-based: more credit to first and last touches

Best when:

  • you need something easy to explain
  • data is limited
  • stakeholders want a simple baseline

B. Data-driven models

Better when you have enough journey data.

  • Markov chain attribution: estimates the removal effect of each channel
  • Shapley value attribution: shares credit based on marginal contribution across paths
  • Logistic regression / ML models: predict conversion probability using touch history and assign importance

Best when:

  • you have enough volume
  • journeys are multi-touch
  • you want more realistic credit allocation

5) Recommended practical approach

A good path is:

  1. Start with rules-based attribution to establish a baseline
  2. Move to Markov or Shapley for a more realistic view
  3. Validate with incrementality tests like holdouts or geo experiments

6) Handle channel-specific issues

Paid search

  • Separate brand vs non-brand
  • Avoid double counting clicks from multiple platforms
  • Distinguish upper-funnel and lower-funnel search campaigns

Paid social

  • Decide whether to include impressions or only clicks
  • View-through attribution can over-credit social if not controlled carefully

Email

  • Include sends, opens, and clicks, but usually give most weight to clicks
  • Watch for automated opens and privacy-related tracking noise

7) Define credit assignment

Example for a simple time-decay model:

  • Touches 1 day before conversion get more credit than touches 7 days before
  • Normalize credits so each conversion sums to 100%

Example:

  • Paid Search: 40%
  • Email: 35%
  • Paid Social: 25%

8) Validate the model

Check whether results make sense:

  • Does brand search get too much credit?
  • Does email dominate just because it appears last?
  • Do results align with conversion lift tests?
  • Are assisted conversions being recognized?

Use:

  • A/B tests
  • geo experiments
  • holdout audiences
  • channel suppression tests

9) Operationalize it

Put it into a dashboard or model pipeline:

  • ingest daily touchpoint data
  • stitch user journeys
  • run attribution logic
  • output channel/campaign credit
  • compare against spend, CPA, ROAS

10) Tools you can use

  • SQL + Python/R for custom models
  • GA4 for built-in attribution
  • BigQuery / Snowflake for data warehousing
  • BI tools like Looker, Tableau, Power BI
  • Marketing mix modeling if you also want spend-level, channel-level budget guidance

Simple recommendation

If you’re starting from scratch:

  1. Build a multi-touch path table
  2. Use time-decay or linear attribution first
  3. Move to Markov chain attribution
  4. Validate with incrementality tests

If you want, I can also give you:

  • a SQL schema for the attribution table,
  • a Python example for Markov attribution,
  • or a step-by-step setup in GA4/BigQuery.

Observation history

How did Obsurfable measure this prompt?

Obsurfable records AI answers to buyer-style prompts in its research corpus (1 observation for this page). Metrics are distributions over observations, not a single static ranking.

Which AI systems does Obsurfable collect answers from?

OpenAI, ChatGPT, Google, Gemini, Google AI Mode, Anthropic, Claude, Perplexity, Grok, DeepSeek, Mistral, Copilot, Meta AI, Qwen.

How can brands improve their AEO?

Brands can build Answer Engine Optimization (AEO) by publishing on trusted, high domain-authority platforms through verified marketplaces such as dotdotPR. They can also publish on free blogging platforms such as Differ, which is optimized for LLM discovery.

Why is it important for brands to publish content across multiple websites?

Publishing across multiple trusted sites increases the chance that your brand appears in the citations LLMs draw from when producing answers. Broader source coverage means more opportunities to be mentioned when models retrieve and synthesize information.

Want this interpreted for your brand?

Explorer is the free public corpus. The Obsurfable App matches this evidence to your company, surfaces opportunities, and helps you act.