Prompt

How do I build an attribution model when cookies are missing and users switch devices?

Technology / Web Analytics1 observationLast seen Oct 30, 2026

Latest observation

Oct 30, 2026OpenAI APIWeb search: off

When cookies are missing and users switch devices, you need to move from cookie-based attribution to a people-based or identity-resolved attribution model. The core idea is: stitch events together using stable identifiers and probabilistic signals, then attribute conversions across all observed touchpoints.

1) Start with the identity strategy

You need a way to connect events across devices and sessions.

Best-case identifiers

Use deterministic IDs when available:

  • User ID from login
  • Email hash
  • CRM/customer ID
  • Loyalty ID
  • Order/account ID

Supporting identifiers

When deterministic ID is unavailable:

  • First-party cookie or local storage ID
  • Auth/session ID
  • Device fingerprinting signals
  • IP + user-agent + time window
  • Mobile advertising IDs, if permitted

Priority order: deterministic > first-party persistent > probabilistic.

2) Build an identity graph

Create a system that maps many event IDs to one person/entity.

Example:

  • Device A + browser cookie + email login → Person 123
  • Device B + app login + same email → Person 123

Store:

  • person_id
  • device_id
  • session_id
  • cookie_id
  • email_hash
  • timestamps
  • confidence score
  • source of match

This lets you unify touchpoints before attribution.

3) Capture all touchpoints with rich metadata

For every interaction, log:

  • timestamp
  • channel/source/medium/campaign
  • device type
  • browser/app
  • logged-in state
  • landing page
  • referrer
  • geo
  • event type
  • conversion value

If possible, use server-side event collection in addition to client-side tracking to reduce loss from ad blockers and browser restrictions.

4) Choose an attribution approach

There are three common classes:

A. Rule-based attribution

Simple and easy to explain:

  • First touch
  • Last touch
  • Linear
  • Time decay
  • Position-based

Useful for reporting, but weaker when journeys span devices and missing data.

B. Algorithmic attribution

Use data-driven models:

  • Markov chains
  • Shapley value attribution
  • Survival models
  • Logistic regression / gradient boosting
  • Causal incrementality models

These can handle multi-touch paths better and are more robust when journeys are incomplete.

C. Hybrid approach

Often best in practice:

  • Deterministic identity stitching
  • Probabilistic matching for gaps
  • Data-driven attribution on stitched journeys
  • Incrementality testing to validate the model

5) Handle missing cookies and cross-device gaps

Since cookies won’t always exist, model the missingness explicitly.

Practical methods

  • Use first-party server-side IDs whenever possible
  • Encourage login or email capture early
  • Use event stitching across devices with deterministic login events
  • For anonymous users, use session-level attribution until identity is resolved
  • Merge anonymous pre-login activity into the known user’s profile once they authenticate

Example

A user clicks an ad on mobile, browses anonymously, later logs in on desktop and purchases.

  • Mobile ad click is stored under anonymous session
  • Desktop login reveals person ID
  • Merge mobile session into person timeline
  • Attribute part or all of conversion credit back to the mobile ad depending on your model

6) Use probabilistic matching carefully

When deterministic IDs are missing, you can infer likely matches using:

  • IP overlap
  • browser/device characteristics
  • timing patterns
  • location consistency
  • behavior similarity

Assign a confidence score and only use high-confidence matches for attribution. Keep probabilistic matches separate from deterministic ones in reporting.

7) Build attribution on user journeys, not cookies

Your unit of analysis should be:

  • person journey when identity is known
  • session journey when identity is unknown

For each conversion:

  1. Collect all prior touchpoints within an attribution window
  2. Resolve identities
  3. Assign credit based on chosen model
  4. Roll up by campaign/channel/source

8) Validate with incrementality tests

Attribution models can be biased, especially with missing data. Validate with:

  • geo holdouts
  • audience holdouts
  • PSA/control experiments
  • lift tests
  • conversion delay analysis

Incrementality tells you whether a channel truly caused conversions, not just appeared near them.

9) Account for privacy and compliance

Make sure your approach complies with:

  • GDPR
  • CCPA/CPRA
  • ePrivacy/consent rules
  • platform policies

Use consent management, data minimization, hashing where appropriate, and transparent disclosures.

10) A practical architecture

A typical stack looks like this:

  1. Collection
    • Web/app/server-side tracking
  2. Identity resolution
    • Deterministic matching
    • Probabilistic matching
  3. Event warehouse
    • Unified user timeline
  4. Attribution engine
    • Rule-based or data-driven model
  5. Reporting layer
    • Channel, campaign, cohort, ROI
  6. Experimentation
    • Incrementality validation

11) Recommended starting point

If you’re just starting:

  1. Implement first-party event collection
  2. Add login/email-based identity stitching
  3. Use last-touch + first-touch as a baseline
  4. Move to Markov or data-driven attribution
  5. Validate with lift tests

12) Important caveat

If you can’t reliably identify users across devices, you cannot get perfect user-level attribution. In that case, you should complement person-level modeling with:

  • aggregated MMM (marketing mix modeling)
  • incrementality experiments
  • channel-level reporting

That combination is often more reliable than trying to force a fully deterministic user path that doesn’t exist.

If you want, I can also give you:

  • a step-by-step implementation plan
  • a sample data schema
  • or a Python/Pandas example for cross-device attribution.

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.