Giter Site home page Giter Site logo

marketing_attribution_metrics's Introduction

Marketing Attribution Metrics dbt Package (Docs)

๐Ÿ“ฃ What does this dbt package do?

This package provides cross-functional metrics by combining Hubspot data from Fivetran's Hubspot connector and Segment data from Fivetran's Segment connector. It uses data in the format described by Hubspot ERD and Segment ERD.

This package enables you to attribute marketing campaigns to product events. The scope of this package is not just limited to product events, it can be transactions/subscriptions on Stripe and other activities tracked by SaaS tools.

Metrics

This package contains transformed models built on top of Houseware's Hubspot package and Houseware's Segment package. Dependencies on these packages have been declared in this package's packages.yml file, so it will automatically download when you run dbt deps. The metrics offered by this package are described below

metric description
weekly_email_to_product_events Weekly Email to Product Events.

|

๐ŸŽฏ How do I use the dbt package?

Step 1: Prerequisites

To use this dbt package, you must have the following:

  • At least one Fivetran hubspot connector and one Fivetran segment connector syncing data into your destination.
  • A BigQuery, Snowflake, Redshift, or PostgreSQL destination.

Step 2: Install the package

Check dbt Hub for the latest installation instructions, or read the dbt docs for more information on installing packages.

Include in your packages.yml

packages:
  - git: "https://github.com/HousewareHQ/marketing_attribution_metrics.git"
    revision: v0.1.0

Step 3: Define database and schema variables

By default, this package will look for your Hubspot data in the fivetran_hubspot schema and Segment data in the fivetran_segment schema of your target database. If this is not where your data is, please add the following configuration to your dbt_project.yml file:

# dbt_project.yml

...
config-version: 2

vars:
  hubspot_source:
    hubspot_schema: my_new_schema_name
  
  segment_metrics:
    segment__schema: my_new_schema_name

For additional configurations for the Hubspot source models, please visit the Hubspot source package.

(Optional) Step 4: Change build schema

By default this package will build the Hubspot staging models within a schema titled (<target_schema> + _stg_hubspot) and the Hubspot metrics as well as Segment metrics within <target_schema> in your target database. If this is not where you would like your modeled Hubspot data to be written to, add the following configuration to your dbt_project.yml file:

# dbt_project.yml

...
models:
  hubspot_metrics:
    +schema: my_new_schema_name # leave blank for just the target_schema
  hubspot_source:
    +schema: my_new_schema_name # leave blank for just the target_schema
  segment_metrics:
    +schema: my_new_schema_name # leave blank for just the target_schema

(Optional) Step 5: Override package variables

vars:
  marketing_attribution_metrics:
    hubspot_email_event_filter__in: "('OPEN', 'CLICK')" # add more hubspot events here, if needed
    hubspot_event_to_segment_event_time_interval: hour # change this to any `datediff` interval (hour, day, year, etc)
    hubspot_event_to_segment_event_time_value: 2 # interval value between segment events and hubspot events 

๐Ÿ—„ Which warehouses are supported?

This package has been tested on Snowflake.

๐Ÿ™Œ Can I contribute?

Additional contributions to this package are very welcome! Please create issues or open PRs against main. Check out this post on the best workflow for contributing to a package.

๐Ÿช Are there any resources available?

marketing_attribution_metrics's People

Contributors

sp35 avatar aryanmadhavverma avatar nipunj15 avatar shubh24 avatar

Stargazers

Bikram Sutar avatar

Watchers

Divyansh Saini avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.