Skip to main content

Set up the Attribution dbt Package

Data modeling
  • Introduction

  • Before you start

  • Enabling Conversions within Unified Package

  • Setting up locally

  • Setting up via Snowplow Console

  • Optional - Configuring Channel Group Classification

  • Optional - Adding Marketing Spend Source for ROAS

Last updated on

Introduction

This tutorial walks you through how to set up Snowplow’s Attribution dbt package. It assumes you have already followed our Snowplow Unified Package tutorial, or previously configured it, as the Attribution package requires the model outputs (e.g. unified views and conversions tables).

Prerequisites

  • dbt installed (and dbt profile configured for Data Warehouse connection)
  • have the Campaign attribution enrichment enabled to generate the marketing campaign fields such as mkt_medium, mkt_source, mkt_term, mkt_content, and mkt_campaign which would be needed for channel and campaign classification to ultimately calculate the appropriate attribution
  • have the Referer parser enrichment enabled to extract attribution data from referer URLs
  • Snowplow Unified Digital dbt Package configured and run (v0.4.0 or above) it will generate the following source tables for you:
    • snowplow_unified_views table as a path (touch points) source
    • snowplow_unified_conversions table as a conversions source including the revenue (generated by the optional conversions module)
    • snowplow_unified_user_mapping table as the user mapping source (needed for user stitching)
  • (Optional) Marketing Spend Source table. See more information here. It will contain your marketing spend data by channel and or campaign with a timestamp field which denotes the period. This is needed for the ROAS calculation within the snowplow_attribution_overview model.