Attribution
A customer arrives through an ad, comes back through the newsletter, then buys after typing the address. Which visit “made” the sale? Each attribution model answers differently; eodia analytics computes all six, and insights dashboards compare them.
Touchpoints
Section titled “Touchpoints”The analytics.touchpoints view gives each person’s visits, in order: their rank (rank),
their channel, source, medium and campaign. The person is the matched identity if the visitor
signed in, otherwise the visitor identifier (see
the signed-in visitor).
To follow a person from one visit to the next, they must be recognized: measurement cookie, consent given, or signed-in visitor. In cookieless mode, the hash changes every day, and attribution is limited to the day; the view’s comment says so.
The attribution window
Section titled “The attribution window”Only visits in the 30 days before the conversion count, by default. The window is set per site, from 1 to 90 days (Site settings › Attribution window).
The six models
Section titled “The six models”model | Distribution |
|---|---|
first_click | everything to the first visit |
last_click | everything to the last visit |
last_non_direct | everything to the last non-direct visit; to the direct visit only if it is the only one |
linear | equal shares across all visits |
position_based | 40% to the first, 40% to the last, 20% spread across the others |
time_decay | a share that halves every 7 days before the conversion |
last_non_direct is Google Analytics’ default model apart from the “data-driven” model. There
is no “data-driven” model: it requires volumes and training beyond the reach of a view.
The attribution view
Section titled “The attribution view”One row per conversion, visit and model. Conversions are goals reached
(conversion_kind = 'goal') and orders (purchase).
| Column | Contents |
|---|---|
model | the model |
conversion_kind, conversion, conversion_id, converted_at | the conversion: goal or order, its name, its identifier, its instant |
person | the person who converted |
session_id, started_at | the credited visit |
touchpoint, touchpoints | the rank of the visit in the journey, and the number of visits in the journey |
channel, source, medium, campaign | the origin of the credited visit |
credit | the share of the conversion attributed to the visit, from 0 to 1; the sum is 1 per conversion and per model |
value | the attributed value: credit × conversion value |
days_before | the time between the visit and the conversion, in days |
Comparing models
Section titled “Comparing models”-- Revenue attributed by channel, according to each model (last 30 days)SELECT model, channel, round(sum(value), 2) AS revenueFROM analytics.attributionWHERE conversion_kind = 'purchase' AND day >= current_date - INTERVAL '30' DAYGROUP BY model, channelORDER BY model, revenue DESCIn the demo, Maison Arvor customers often come back three times before buying: the “first visit” model credits paid social, “last visit” credits direct, “last non-direct visit” credits the newsletter. None of them is wrong; they do not tell the same story.
-- The average time between the first visit and the orderSELECT avg(days_before) AS daysFROM analytics.attributionWHERE model = 'first_click' AND conversion_kind = 'purchase'A goal is declared in the site’s Metadata tab: a page reached (/contact/merci, * for
any text) or an event (optionally with a property to check), and a value: none, fixed, or the
event’s value property. The analytics.goals view lists them, and analytics.conversions
gives each goal reached.
eodia analytics is free software by Eodia.