Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add conversion metrics #26

Merged
merged 8 commits into from
Oct 15, 2024
Merged

Add conversion metrics #26

merged 8 commits into from
Oct 15, 2024

Conversation

fivetran-jamie
Copy link
Contributor

@fivetran-jamie fivetran-jamie commented Oct 9, 2024

PR Overview

This PR will address the following Issue/Feature:
add conversions project

This PR will result in the following new package version:

v0.8.0

Please provide the finalized CHANGELOG entry which details the relevant changes included in this PR:

Feature Updates: Native Conversion Support

We have added more robust support for conversions in our data models by doing the following:

  • Created the twitter_ads__conversion_fields and twitter_ads__conversion_sale_amount_fields variables to pass through conversion metrics (total number and monetary value, respectively).
    • By default, twitter_ads__conversion_fields will include conversion_purchases_metric and conversion_custom_metric.
    • By default, twitter_ads__conversion_sale_amount_fields will include conversion_purchases_sale_amount and conversion_custom_sale_amount.
    • These conversion fields will be included in each end model report. Additionally, they will be summed up into new total_conversions and total_conversions_sale_amount columns.
    • See README for more details on how to configure these variables.

Under the Hood

  • Ensured the above changes maintain backwards compatibility with existing passthrough column variables.
    • Added a new version of the persist_pass_through_columns() macro in which we can include coalesces and properly check between conversion field values and the existing passthrough columns.
  • Added integrity and consistency validation tests within integration_tests for the Twitter Ads transformation models.

Documentation

  • Highlighted all metrics included in the package by default. Previously, url_clicks and spend_micro were missing from this README section.
  • Documented how to configure the new twitter_ads__conversion_fields and twitter_ads__conversion_sale_amount_fields variables here.
  • Added Contributors subsection to README.

Contributors

PR Checklist

Basic Validation

Please acknowledge that you have successfully performed the following commands locally:

  • dbt run –full-refresh && dbt test
  • dbt run (if incremental models are present) && dbt test

Before marking this PR as "ready for review" the following have been applied:

  • The appropriate issue has been linked, tagged, and properly assigned
  • All necessary documentation and version upgrades have been applied
  • docs were regenerated (unless this PR does not include any code or yml updates)
  • BuildKite integration tests are passing
  • Detailed validation steps have been provided below

Detailed Validation

Please share any and all of your validation steps:

See validation tests added
image

If you had to summarize this PR in an emoji, which would it be?

🐦

@fivetran-jamie fivetran-jamie changed the title things are running Add conversion metrics Oct 10, 2024
@fivetran-jamie fivetran-jamie marked this pull request as ready for review October 10, 2024 22:17
Copy link
Contributor

@fivetran-joemarkiewicz fivetran-joemarkiewicz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@fivetran-jamie this generally looks to go from my end! I was able to test all the passthrough and default override cases and everything looks to be working as expected!

I have a few comments below, but nothing that would be blocking the approval. Once those updates are applied, this should be good to go!

README.md Show resolved Hide resolved
packages.yml Outdated Show resolved Hide resolved
integration_tests/dbt_project.yml Show resolved Hide resolved
Copy link
Contributor

@fivetran-catfritz fivetran-catfritz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@fivetran-jamie All lgtm!

@fivetran-jamie fivetran-jamie merged commit afd4974 into main Oct 15, 2024
2 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants