Skip to main content

Attribution

Contain attribution calculations for each enabled attribution model. Each model is defined through the Dreamdata Data Hub UI.

Attribution calculations are done on the individual stage journeys (identified by dd_stage_id).

There is an attribution value and weight for each attribution model for each stage. The value is the monetary value associated with the session and the weight is a number between 0-1 (a session can maximally get 100% of the credit).

Attribution is done on a session level, as attribution is an acquisition channel analysis.

Each attribution model is applied to the same journey, but may exclude different sessions based on the setting of the individual attribution model. For each session (dd_session_id) in a stage journey (dd_stage_id) the attribution weight according to the different attribution models built in the Dreamdata Data Hub UI are in the record attribution.

Each session is repeated in the table for each stage journey it is part of. So the primary key is the comination of dd_session_id and dd_stage_id.

The most standard use of the table needs to filter or group by on both a stage name and an attribution model

In BigQuery SQL this is similar to

SELECT *
FROM attribution_table AS r, UNNEST(attribution) AS a
WHERE a.model =Data-Driven’
AND r.stage.name = ‘Closed-Won’

Relationship to events table:

The table contains session parameters similar to the events.session in events table.

The sessions included in the attribution analysis can be obtained from events table by unnesting the stage array (to obtain events in each stage journey) and picking the first event of the session.

In BigQuery SQL this is similar to

SELECT
e.session,
s.dd_stage_id,
s.name
FROM events_table as e, UNNEST(stages) as s
WHERE dd_event_session_order = 1