Skip to content

Commit

Permalink
docs
Browse files Browse the repository at this point in the history
  • Loading branch information
fivetran-jamie committed May 23, 2024
1 parent 7ccbf4a commit c00cc87
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 6 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/add-2nd-reviewer.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: '2nd reviewer'
on:
pull_request_review:
types: [submitted]

jobs:
auto_assign_reviewer:
if: github.event.review.state == 'approved'
uses: fivetran/dbt_package_automations/.github/workflows/add-2nd-reviewer.yml@main
secrets: inherit
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ Introducing...conversion metrics ([PR #43](https://github.com/fivetran/dbt_faceb
- Adds a `conversion_value` field to each `_report` end model, representing the value of conversions (calculated using the default attribution window set in Meta) that occurred on each day for each ad/campaign/ad set/url/account.
- Creates a `facebook_ads__basic_ad_actions_passthrough_metrics` variable to pass through additional conversion value metrics that are calculated using different attribution windows.
- By default, the package includes only the conversion value calculated using the default attribution window, but your report may include calculations using the other windows defined [here](https://developers.facebook.com/docs/marketing-api/reference/ads-action-stats/). See [README](https://github.com/fivetran/dbt_facebook_ads_source/tree/main?tab=readme-ov-file#passing-through-additional-metrics) for details on how to use the new variable.
- Adds `optimization_goal` field to `facebook_ads__ad_set_report` model. This is defined as the optimization goal this ad set is using, possible values of which are defined [here](https://developers.facebook.com/docs/marketing-api/reference/ad-campaign/#fields).
- Adds `conversion_domain` field to `facebook_ads__ad_report` model. This is defined as the domain you've configured the ad to convert to.

## Documentation
- Documents the ability to transform metrics provided to the `facebook_ads__basic_ad_passthrough_metrics` variable. See [README](https://github.com/fivetran/dbt_facebook_ads/tree/main?tab=readme-ov-file#passing-through-additional-metrics) for details ([PR #43](https://github.com/fivetran/dbt_facebook_ads/pull/43)).
Expand Down
2 changes: 1 addition & 1 deletion docs/catalog.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/manifest.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/run_results.json

Large diffs are not rendered by default.

6 changes: 5 additions & 1 deletion models/facebook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,8 @@ models:
description: The spend on the ad in the given day.
- name: conversion_value
description: Value of conversions using the default attribution window on the given day.
- name: conversion_domain
description: The domain you've configured the ad to convert to.

- name: facebook_ads__ad_set_report
description: Each record represents the daily performance of a Facebook ad set.
Expand Down Expand Up @@ -150,7 +152,9 @@ models:
description: The spend on the ad in the given day.
- name: conversion_value
description: Value of conversions using the default attribution window on the given day.

- name: optimization_goal
description: The optimization goal this ad set is using. Possible values defined [here](https://developers.facebook.com/docs/marketing-api/reference/ad-campaign/#fields).

- name: facebook_ads__campaign_report
description: Each record represents the daily performance of a Facebook campaign.
tests:
Expand Down
3 changes: 2 additions & 1 deletion models/facebook_ads__ad_report.sql
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ joined as (
ad_sets.ad_set_name,
ads.ad_id,
ads.ad_name,
ads.conversion_domain,
sum(report.clicks) as clicks,
sum(report.impressions) as impressions,
sum(report.spend) as spend
Expand All @@ -82,7 +83,7 @@ joined as (
left join ad_sets
on ads.ad_set_id = ad_sets.ad_set_id
and ads.source_relation = ad_sets.source_relation
{{ dbt_utils.group_by(10) }}
{{ dbt_utils.group_by(11) }}
)

select *
Expand Down
3 changes: 2 additions & 1 deletion models/facebook_ads__ad_set_report.sql
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ joined as (
ad_sets.bid_strategy,
ad_sets.daily_budget,
ad_sets.budget_remaining,
ad_sets.optimization_goal,
sum(report.clicks) as clicks,
sum(report.impressions) as impressions,
sum(report.spend) as spend
Expand All @@ -85,7 +86,7 @@ joined as (
left join ad_sets
on ads.ad_set_id = ad_sets.ad_set_id
and ads.source_relation = ad_sets.source_relation
{{ dbt_utils.group_by(13) }}
{{ dbt_utils.group_by(14) }}
)

select *
Expand Down

0 comments on commit c00cc87

Please sign in to comment.