DATALYR

Product analytics attribution: Amplitude, Mixpanel, PostHog

How Amplitude, Mixpanel and PostHog attribute users to campaigns, why their answers differ from ad platforms, and how to add spend, click IDs and payments.

By DATALYR · · 3 min read

Contents

How product analytics attributes users

Amplitude, Mixpanel and PostHog attribute users and events to campaigns using the UTM parameters and referrers their SDKs capture on your site. That makes them good at a product question: which channels bring users who activate, retain and use the product.

Paid acquisition adds questions they are not set up to answer on their own: what each campaign cost, which ad click ID came with the visit, which payment the user eventually made, and what to send back to the ad platform so bidding improves. Those need spend, click IDs and billing data joined to the same users.

Most teams run both. Product analytics stays the place for behavior; an ad attribution layer handles spend, revenue by campaign and conversion delivery.

What each tool records

Mixpanel's Attribution feature, available on Growth and Enterprise plans, distributes a conversion metric across a property such as utm_source. The default model is last touch with a 30-day lookback window, and the other models include first touch, linear, time decay, U-shaped and custom weights. Mixpanel asks you to track UTM parameters as event properties on every touchpoint.

Amplitude's Browser SDK stores first-touch values in initial_ user properties, such as initial_utm_source, set once when attribution data is first seen. Non-prefixed properties update at the start of each session, so they reflect the latest campaign.

PostHog stores first-touch values such as $initial_utm_source as person properties and attaches the latest UTM values to events. Its Marketing analytics beta pulls spend from connected ad platforms and matches campaigns to conversions by UTM values.

Example: one user, three answers

This is a hypothetical journey. On day 1 a visitor clicks a Meta ad tagged utm_source=facebook and signs up. On day 4 they search your brand on Google, click an ad tagged utm_source=google and activate. On day 12 they pay $99 through Stripe.

Mixpanel's default last-touch model with a 30-day lookback credits the payment to google. A first-touch model credits facebook. Amplitude keeps facebook in initial_utm_source and google in utm_source. All three answers are correct for the rule they apply.

The ad platforms see it differently again. Meta counts the conversion only if it falls inside its attribution setting, and Google applies its own window. Before comparing tools, write down the model and window each number uses.

Same journey, different rules

First touch

facebook gets the $99

The day-1 Meta click started the journey.

Last touch, 30 days

google gets the $99

The day-4 brand search was the last tagged visit.

Hypothetical journey: Meta click day 1, Google click day 4, payment day 12.

What ad decisions also need

Cost. Attribution without spend tells you where users came from but not what they cost. Spend has to come from each ad platform at campaign and ad level, in the same currency and timezone as the conversions.

Click IDs. Ad platforms match conversions on their own click identifiers, such as fbclid, gclid, ttclid and li_fat_id, not on UTMs. Sending conversions back for bidding requires capturing those IDs on the landing visit and keeping them with the user.

Payments. Product analytics often receives a purchase event from the browser or app. Billing systems record what was actually paid, refunded and renewed. Revenue by campaign is most reliable when it comes from the billing system.

Where DATALYR fits alongside

DATALYR's tracking script captures UTMs and ad click IDs from Meta, Google, TikTok, Snapchat, X, LinkedIn and AppLovin on the landing visit, and keeps them with the user through identify calls. Revenue comes from connected payment sources such as Stripe, and conversions go back to the ad platforms through rules.

The default model is first click, a rule can select last click instead, and a same-session match always wins. Renewals are credited to the campaign that acquired the customer.

Keep Amplitude, Mixpanel or PostHog for activation and retention analysis. Use the same UTM taxonomy in every tool so a campaign has one name everywhere.

Running product analytics with GA4

PostHog, Amplitude or Mixpanel can run alongside Google Analytics 4. Each loads its own tag and keeps its own identity, so their user counts will not match exactly.

Pick one tool as the reference for each question: product usage in your product analytics tool, site traffic in GA4, and revenue by campaign in the system that reads your billing data. Agreeing on the reference saves more time than reconciling every number.

Related articles.

See what really drives revenue.

Real-time attribution, analytics and conversions for every channel, campaign and ad, ready for your team and your agents.

Get started