Skip to main content

Fractribution

Package Configuration Variablesโ€‹

This package utilizes a set of variables that are configured to recommended values for optimal performance of the models. Depending on your use case, you might want to override these values by adding to your dbt_project.yml file.

caution

All variables in Snowplow packages start with snowplow__ but we have removed these in the below table for brevity.

Warehouse and trackerโ€‹

Variable NameDescriptionDefault
page_views_sourceThe source (schema and table) of the derived snowplow_web_page_views table{{ source('derived', 'snowplow_web_page_views') }}
web_user_mapping_tableThe schema and table name of the snowplow web user mapping table, if different to defaultderived.snowplow_web_user_mapping
conversions_sourceThe source (schema and table) of your conversion events, likely your atomic events table{{ source('atomic', 'events') }}

Operation and logicโ€‹

Variable NameDescriptionDefault
conversion_window_start_dateThe start date in UTC for the window of conversions to includecurrent_date()-31
conversion_window_end_dateThe end date in UTC for the window of conversions to include
conversion_window_daysThe last complete nth number of days (calculated from the last processed pageview within page_views_source) to dynamically update the conversion_window_start_date and end_date with. Will only apply if both variables are left as an empty string30
path_lookback_daysRestricts the model to marketing channels within this many days of the conversion (values of 30, 14 or 7 are recommended)30
path_lookback_stepsThe limit for the number of marketing channels to look at before the conversion0 (unlimited)
path_transformsDictionary of path transforms (and their argument, null if none) to perform on the full conversion path (see udfs.sql file){'exposure_path': null}
use_snowplow_web_user_mapping_tabletrue if you are using the Snowplow web model for web user mappings (domain_userid => user_id)false
snowplow__conversions_source_filterA timestamp field the conversion source field is partitioned on (ideally) for optimized filtering, when left blank derived_tstamp is usedblank
snowplow__conversions_source_filter_buffer_daysThe number of days to extend the filter1

Contexts, filters, and logsโ€‹

Variable NameDescriptionDefault
channels_to_excludeList of channels to exclude from analysis (empty to keep all channels). For example, users may want to exclude the 'Direct' channel from the analysis.[]
channels_to_includeList of channels to include in the analysis (empty to keep all channels). For example, users may want to include the 'Direct' channel only in the analysis.[]
conversion_hostsurl_hosts to filter to in the data processing[a.com]
consider_intrasession_channelsIf false, only considers the channel at the start of the session (i.e. first page view). If true, considers multiple channels in the conversion session as well as historically.false

Warehouse Specificโ€‹

Variable NameDescriptionDefault
run_python_script_in_snowparkA flag for if you wish to run the python scripts using Snowpark.false
attribution_model_for_snowparkThe attribution model to use when running in Snowpark; one of shapley, first_touch, last_touch, position_based, linear. See the package docs for more information.shapley

Output Schemasโ€‹

By default all scratch/staging tables will be created in the <target.schema>_scratch schema, the derived tables, will be created in <target.schema>_derived and all manifest tables in <target.schema>_snowplow_manifest. Some of these schemas are only used by specific packages, ensure you add the correct configurations for each packages you are using. To change, please add the following to your dbt_project.yml file:

tip

If you want to use just your connection schema with no suffixes, set the +schema: values to null

models:
snowplow_fractribution:
+schema: my_derived_schema

Config Generatorโ€‹

You can use the below inputs to generate the code that you need to place into your dbt_project.yml file to configure the package as you require. Any values not specified will use their default values from the package.

Warehouse and tracker
Source of your conversions table
Source of the snowplow_web_page_views table
Schema and table of the User Mapping table
Operation and Logic
Optional variable in place of conversion_window_start_date and end_date to automatically define the conversion period.
End date (UTC) of your conversion window
Start date (UTC) of your conversion window
A timestamp field the conversions source field is partitioned on for optimized filtering
The number of days to extend the filter
Days to lookback from the conversion to include in the path
Maximum number of steps before the conversion (0 is unlimited)
snowplow__path_transforms

Please select the path transformations, in the order to apply them. Some transformations have arguments that need specifying, others have no arguments but need a value of `null` if you wish to use this transformation.
Consecutive same channels are reduced to one
First occurrence of path is kept
Keeps count of channel frequency
Remove the channel if it is the last, but not all, channel
Remove all occurrences of the channel, if it isn't the only channel
No change
Contexts, Filters, and Logs
Channels to Exclude

> Click the plus sign to add a new entry
Channels to Include

> Click the plus sign to add a new entry
Conversion Hosts

> Click the plus sign to add a new entry
Warehouse Specific

Project Variables:

vars:
snowplow_fractribution: null
Was this page helpful?