diff --git a/macros/get_account_conversions_report_columns.sql b/macros/get_account_conversions_report_columns.sql index dbb92f1..38c075b 100644 --- a/macros/get_account_conversions_report_columns.sql +++ b/macros/get_account_conversions_report_columns.sql @@ -4,11 +4,13 @@ {"name": "_fivetran_synced", "datatype": dbt.type_timestamp()}, {"name": "account_id", "datatype": dbt.type_string()}, {"name": "click_through_conversion_attribution_window_month", "datatype": dbt.type_int()}, + {"name": "clicks", "datatype": dbt.type_int()}, {"name": "date", "datatype": "date"}, {"name": "event_name", "datatype": dbt.type_string()}, {"name": "total_items", "datatype": dbt.type_int()}, {"name": "total_value", "datatype": dbt.type_int()}, - {"name": "view_through_conversion_attribution_window_month", "datatype": dbt.type_int()} + {"name": "view_through_conversion_attribution_window_month", "datatype": dbt.type_int()}, + {"name": "views", "datatype": dbt.type_int()} ] %} {{ fivetran_utils.add_pass_through_columns(columns, var('reddit_ads__account_conversions_passthrough_metrics')) }} diff --git a/macros/get_ad_conversions_report_columns.sql b/macros/get_ad_conversions_report_columns.sql index 271bb00..8fa1c56 100644 --- a/macros/get_ad_conversions_report_columns.sql +++ b/macros/get_ad_conversions_report_columns.sql @@ -5,11 +5,13 @@ {"name": "account_id", "datatype": dbt.type_string()}, {"name": "ad_id", "datatype": dbt.type_string()}, {"name": "click_through_conversion_attribution_window_month", "datatype": dbt.type_int()}, + {"name": "clicks", "datatype": dbt.type_int()}, {"name": "date", "datatype": "date"}, {"name": "event_name", "datatype": dbt.type_string()}, {"name": "total_items", "datatype": dbt.type_int()}, {"name": "total_value", "datatype": dbt.type_int()}, - {"name": "view_through_conversion_attribution_window_month", "datatype": dbt.type_int()} + {"name": "view_through_conversion_attribution_window_month", "datatype": dbt.type_int()}, + {"name": "views", "datatype": dbt.type_int()} ] %} {{ fivetran_utils.add_pass_through_columns(columns, var('reddit_ads__ad_conversions_passthrough_metrics')) }} diff --git a/macros/get_ad_group_conversions_report_columns.sql b/macros/get_ad_group_conversions_report_columns.sql index 3c9f4e3..bf9b0b6 100644 --- a/macros/get_ad_group_conversions_report_columns.sql +++ b/macros/get_ad_group_conversions_report_columns.sql @@ -5,11 +5,13 @@ {"name": "account_id", "datatype": dbt.type_string()}, {"name": "ad_group_id", "datatype": dbt.type_string()}, {"name": "click_through_conversion_attribution_window_month", "datatype": dbt.type_int()}, + {"name": "clicks", "datatype": dbt.type_int()}, {"name": "date", "datatype": "date"}, {"name": "event_name", "datatype": dbt.type_string()}, {"name": "total_items", "datatype": dbt.type_int()}, {"name": "total_value", "datatype": dbt.type_int()}, - {"name": "view_through_conversion_attribution_window_month", "datatype": dbt.type_int()} + {"name": "view_through_conversion_attribution_window_month", "datatype": dbt.type_int()}, + {"name": "views", "datatype": dbt.type_int()} ] %} {{ fivetran_utils.add_pass_through_columns(columns, var('reddit_ads__ad_group_conversions_passthrough_metrics')) }} diff --git a/macros/get_campaign_conversions_report_columns.sql b/macros/get_campaign_conversions_report_columns.sql index 0e680e2..905b855 100644 --- a/macros/get_campaign_conversions_report_columns.sql +++ b/macros/get_campaign_conversions_report_columns.sql @@ -5,11 +5,13 @@ {"name": "account_id", "datatype": dbt.type_string()}, {"name": "campaign_id", "datatype": dbt.type_string()}, {"name": "click_through_conversion_attribution_window_month", "datatype": dbt.type_int()}, + {"name": "clicks", "datatype": dbt.type_int()}, {"name": "date", "datatype": "date"}, {"name": "event_name", "datatype": dbt.type_string()}, {"name": "total_items", "datatype": dbt.type_int()}, {"name": "total_value", "datatype": dbt.type_int()}, - {"name": "view_through_conversion_attribution_window_month", "datatype": dbt.type_int()} + {"name": "view_through_conversion_attribution_window_month", "datatype": dbt.type_int()}, + {"name": "views", "datatype": dbt.type_int()} ] %} {{ fivetran_utils.add_pass_through_columns(columns, var('reddit_ads__campaign_conversions_passthrough_metrics')) }} diff --git a/macros/get_campaign_country_conversions_report_columns.sql b/macros/get_campaign_country_conversions_report_columns.sql index 37fc199..9382e7e 100644 --- a/macros/get_campaign_country_conversions_report_columns.sql +++ b/macros/get_campaign_country_conversions_report_columns.sql @@ -6,12 +6,14 @@ {"name": "avg_value", "datatype": dbt.type_float()}, {"name": "campaign_id", "datatype": dbt.type_string()}, {"name": "click_through_conversion_attribution_window_month", "datatype": dbt.type_int()}, + {"name": "clicks", "datatype": dbt.type_int()}, {"name": "country", "datatype": dbt.type_string()}, {"name": "date", "datatype": "date"}, {"name": "event_name", "datatype": dbt.type_string()}, {"name": "total_items", "datatype": dbt.type_int()}, {"name": "total_value", "datatype": dbt.type_int()}, - {"name": "view_through_conversion_attribution_window_month", "datatype": dbt.type_int()} + {"name": "view_through_conversion_attribution_window_month", "datatype": dbt.type_int()}, + {"name": "views", "datatype": dbt.type_int()} ] %} {{ fivetran_utils.add_pass_through_columns(columns, var('reddit_ads__campaign_country_conversions_passthrough_metrics')) }} diff --git a/models/docs.md b/models/docs.md index 2ab25f8..4fa97b7 100644 --- a/models/docs.md +++ b/models/docs.md @@ -221,7 +221,7 @@ Provides a summary of conversion events at the account level, aggregating key me The average value of conversions over a given period. {% enddocs %} -{% docs click_through_conversion_attribution_window_month %} +{% docs clicks %} The total click-through conversions attributed, for the given month-long window. {% enddocs %} @@ -245,7 +245,7 @@ The total number of items involved in a conversion event. This is typically used The total monetary value associated with a conversion event. {% enddocs %} -{% docs view_through_conversion_attribution_window_month %} +{% docs views %} The total view-through conversions attributed, for the given month-long window. {% enddocs %} diff --git a/models/src_reddit_ads.yml b/models/src_reddit_ads.yml index 218d71f..106e62c 100644 --- a/models/src_reddit_ads.yml +++ b/models/src_reddit_ads.yml @@ -360,14 +360,22 @@ sources: description: '{{ doc("_fivetran_synced") }}' - name: avg_value description: '{{ doc("avg_value") }}' + - name: clicks + description: '{{ doc("clicks") }}' - name: click_through_conversion_attribution_window_month - description: '{{ doc("click_through_conversion_attribution_window_month") }}' + description: > + [DEPRECATED] This column has been deprecated as of August 2025 in favor of the `clicks` column. + The total click-through conversions attributed, for the given month-long window. - name: total_items description: '{{ doc("total_items") }}' - name: total_value description: '{{ doc("total_value") }}' + - name: views + description: '{{ doc("views") }}' - name: view_through_conversion_attribution_window_month - description: '{{ doc("view_through_conversion_attribution_window_month") }}' + description: > + [DEPRECATED] This column has been deprecated as of August 2025 in favor of the `views` column. + The total view-through conversions attributed, for the given month-long window. - name: click_through_conversion_attribution_window_day description: '{{ doc("click_through_conversion_attribution_window_day") }}' - name: click_through_conversion_attribution_window_week @@ -393,14 +401,22 @@ sources: description: '{{ doc("_fivetran_synced") }}' - name: avg_value description: '{{ doc("avg_value") }}' + - name: clicks + description: '{{ doc("clicks") }}' - name: click_through_conversion_attribution_window_month - description: '{{ doc("click_through_conversion_attribution_window_month") }}' + description: > + [DEPRECATED] This column has been deprecated as of August 2025 in favor of the `clicks` column. + The total click-through conversions attributed, for the given month-long window. - name: total_items description: '{{ doc("total_items") }}' - name: total_value description: '{{ doc("total_value") }}' + - name: views + description: '{{ doc("views") }}' - name: view_through_conversion_attribution_window_month - description: '{{ doc("view_through_conversion_attribution_window_month") }}' + description: > + [DEPRECATED] This column has been deprecated as of August 2025 in favor of the `views` column. + The total view-through conversions attributed, for the given month-long window. - name: click_through_conversion_attribution_window_day description: '{{ doc("click_through_conversion_attribution_window_day") }}' - name: click_through_conversion_attribution_window_week @@ -426,14 +442,22 @@ sources: description: '{{ doc("_fivetran_synced") }}' - name: avg_value description: '{{ doc("avg_value") }}' + - name: clicks + description: '{{ doc("clicks") }}' - name: click_through_conversion_attribution_window_month - description: '{{ doc("click_through_conversion_attribution_window_month") }}' + description: > + [DEPRECATED] This column has been deprecated as of August 2025 in favor of the `clicks` column. + The total click-through conversions attributed, for the given month-long window. - name: total_items description: '{{ doc("total_items") }}' - name: total_value description: '{{ doc("total_value") }}' + - name: views + description: '{{ doc("views") }}' - name: view_through_conversion_attribution_window_month - description: '{{ doc("view_through_conversion_attribution_window_month") }}' + description: > + [DEPRECATED] This column has been deprecated as of August 2025 in favor of the `views` column. + The total view-through conversions attributed, for the given month-long window. - name: click_through_conversion_attribution_window_day description: '{{ doc("click_through_conversion_attribution_window_day") }}' - name: click_through_conversion_attribution_window_week @@ -459,14 +483,22 @@ sources: description: '{{ doc("_fivetran_synced") }}' - name: avg_value description: '{{ doc("avg_value") }}' + - name: clicks + description: '{{ doc("clicks") }}' - name: click_through_conversion_attribution_window_month - description: '{{ doc("click_through_conversion_attribution_window_month") }}' + description: > + [DEPRECATED] This column has been deprecated as of August 2025 in favor of the `clicks` column. + The total click-through conversions attributed, for the given month-long window. - name: total_items description: '{{ doc("total_items") }}' - name: total_value description: '{{ doc("total_value") }}' + - name: views + description: '{{ doc("views") }}' - name: view_through_conversion_attribution_window_month - description: '{{ doc("view_through_conversion_attribution_window_month") }}' + description: > + [DEPRECATED] This column has been deprecated as of August 2025 in favor of the `views` column. + The total view-through conversions attributed, for the given month-long window. - name: click_through_conversion_attribution_window_day description: '{{ doc("click_through_conversion_attribution_window_day") }}' - name: click_through_conversion_attribution_window_week @@ -519,11 +551,19 @@ sources: description: '{{ doc("event_name") }}' - name: _fivetran_synced description: '{{ doc("_fivetran_synced") }}' + - name: clicks + description: '{{ doc("clicks") }}' - name: click_through_conversion_attribution_window_month - description: '{{ doc("click_through_conversion_attribution_window_month") }}' + description: > + [DEPRECATED] This column has been deprecated as of August 2025 in favor of the `clicks` column. + The total click-through conversions attributed, for the given month-long window. - name: total_items description: '{{ doc("total_items") }}' - name: total_value description: '{{ doc("total_value") }}' + - name: views + description: '{{ doc("views") }}' - name: view_through_conversion_attribution_window_month - description: '{{ doc("view_through_conversion_attribution_window_month") }}' \ No newline at end of file + description: > + [DEPRECATED] This column has been deprecated as of August 2025 in favor of the `views` column. + The total view-through conversions attributed, for the given month-long window. \ No newline at end of file diff --git a/models/stg_reddit_ads.yml b/models/stg_reddit_ads.yml index aa0d1f7..32d7b07 100644 --- a/models/stg_reddit_ads.yml +++ b/models/stg_reddit_ads.yml @@ -267,13 +267,13 @@ models: - name: _fivetran_synced description: '{{ doc("_fivetran_synced") }}' - name: conversions - description: '{{ doc("click_through_conversion_attribution_window_month") }}' + description: '{{ doc("clicks") }}' - name: total_items description: '{{ doc("total_items") }}' - name: total_value description: '{{ doc("total_value") }}' - name: view_through_conversions - description: '{{ doc("view_through_conversion_attribution_window_month") }}' + description: '{{ doc("views") }}' - name: source_relation description: "{{ doc('source_relation') }}" @@ -298,13 +298,13 @@ models: - name: _fivetran_synced description: '{{ doc("_fivetran_synced") }}' - name: conversions - description: '{{ doc("click_through_conversion_attribution_window_month") }}' + description: '{{ doc("clicks") }}' - name: total_items description: '{{ doc("total_items") }}' - name: total_value description: '{{ doc("total_value") }}' - name: view_through_conversions - description: '{{ doc("view_through_conversion_attribution_window_month") }}' + description: '{{ doc("views") }}' - name: source_relation description: "{{ doc('source_relation') }}" @@ -329,13 +329,13 @@ models: - name: _fivetran_synced description: '{{ doc("_fivetran_synced") }}' - name: conversions - description: '{{ doc("click_through_conversion_attribution_window_month") }}' + description: '{{ doc("clicks") }}' - name: total_items description: '{{ doc("total_items") }}' - name: total_value description: '{{ doc("total_value") }}' - name: view_through_conversions - description: '{{ doc("view_through_conversion_attribution_window_month") }}' + description: '{{ doc("views") }}' - name: source_relation description: "{{ doc('source_relation') }}" @@ -360,13 +360,13 @@ models: - name: _fivetran_synced description: '{{ doc("_fivetran_synced") }}' - name: conversions - description: '{{ doc("click_through_conversion_attribution_window_month") }}' + description: '{{ doc("clicks") }}' - name: total_items description: '{{ doc("total_items") }}' - name: total_value description: '{{ doc("total_value") }}' - name: view_through_conversions - description: '{{ doc("view_through_conversion_attribution_window_month") }}' + description: '{{ doc("views") }}' - name: source_relation description: "{{ doc('source_relation') }}" @@ -429,12 +429,12 @@ models: - name: _fivetran_synced description: '{{ doc("_fivetran_synced") }}' - name: conversions - description: '{{ doc("click_through_conversion_attribution_window_month") }}' + description: '{{ doc("clicks") }}' - name: total_items description: '{{ doc("total_items") }}' - name: total_value description: '{{ doc("total_value") }}' - name: view_through_conversions - description: '{{ doc("view_through_conversion_attribution_window_month") }}' + description: '{{ doc("views") }}' - name: source_relation description: "{{ doc('source_relation') }}" \ No newline at end of file diff --git a/models/stg_reddit_ads__account_conversions_report.sql b/models/stg_reddit_ads__account_conversions_report.sql index 75d07fe..a22f149 100644 --- a/models/stg_reddit_ads__account_conversions_report.sql +++ b/models/stg_reddit_ads__account_conversions_report.sql @@ -32,8 +32,8 @@ final as ( lower(event_name) as event_name, coalesce(total_items,0) as total_items, coalesce(total_value,0) as total_value, - coalesce(click_through_conversion_attribution_window_month,0) as conversions, - coalesce(view_through_conversion_attribution_window_month,0) as view_through_conversions + coalesce(clicks, click_through_conversion_attribution_window_month, 0) as conversions, + coalesce(views, view_through_conversion_attribution_window_month, 0) as view_through_conversions {{ fivetran_utils.fill_pass_through_columns('reddit_ads__account_conversions_passthrough_metrics') }} from fields diff --git a/models/stg_reddit_ads__ad_conversions_report.sql b/models/stg_reddit_ads__ad_conversions_report.sql index 1bc7f1d..a23c680 100644 --- a/models/stg_reddit_ads__ad_conversions_report.sql +++ b/models/stg_reddit_ads__ad_conversions_report.sql @@ -33,8 +33,8 @@ final as ( lower(event_name) as event_name, coalesce(total_items,0) as total_items, coalesce(total_value,0) as total_value, - coalesce(click_through_conversion_attribution_window_month,0) as conversions, - coalesce(view_through_conversion_attribution_window_month,0) as view_through_conversions + coalesce(clicks, click_through_conversion_attribution_window_month, 0) as conversions, + coalesce(views, view_through_conversion_attribution_window_month, 0) as view_through_conversions {{ fivetran_utils.fill_pass_through_columns('reddit_ads__ad_conversions_passthrough_metrics') }} from fields diff --git a/models/stg_reddit_ads__ad_group_conversions_report.sql b/models/stg_reddit_ads__ad_group_conversions_report.sql index bad7f53..f55f0da 100644 --- a/models/stg_reddit_ads__ad_group_conversions_report.sql +++ b/models/stg_reddit_ads__ad_group_conversions_report.sql @@ -33,8 +33,8 @@ final as ( lower(event_name) as event_name, coalesce(total_items,0) as total_items, coalesce(total_value,0) as total_value, - coalesce(click_through_conversion_attribution_window_month,0) as conversions, - coalesce(view_through_conversion_attribution_window_month,0) as view_through_conversions + coalesce(clicks, click_through_conversion_attribution_window_month, 0) as conversions, + coalesce(views, view_through_conversion_attribution_window_month, 0) as view_through_conversions {{ fivetran_utils.fill_pass_through_columns('reddit_ads__ad_group_conversions_passthrough_metrics') }} from fields diff --git a/models/stg_reddit_ads__campaign_conversions_report.sql b/models/stg_reddit_ads__campaign_conversions_report.sql index b849bdb..2228e68 100644 --- a/models/stg_reddit_ads__campaign_conversions_report.sql +++ b/models/stg_reddit_ads__campaign_conversions_report.sql @@ -33,8 +33,8 @@ final as ( lower(event_name) as event_name, coalesce(total_items,0) as total_items, coalesce(total_value,0) as total_value, - coalesce(click_through_conversion_attribution_window_month,0) as conversions, - coalesce(view_through_conversion_attribution_window_month,0) as view_through_conversions + coalesce(clicks, click_through_conversion_attribution_window_month, 0) as conversions, + coalesce(views, view_through_conversion_attribution_window_month, 0) as view_through_conversions {{ fivetran_utils.fill_pass_through_columns('reddit_ads__campaign_conversions_passthrough_metrics') }} from fields diff --git a/models/stg_reddit_ads__campaign_country_conversions_report.sql b/models/stg_reddit_ads__campaign_country_conversions_report.sql index 34577ad..91d6565 100644 --- a/models/stg_reddit_ads__campaign_country_conversions_report.sql +++ b/models/stg_reddit_ads__campaign_country_conversions_report.sql @@ -38,8 +38,8 @@ final as ( lower(event_name) as event_name, coalesce(total_items,0) as total_items, coalesce(total_value,0) as total_value, - coalesce(click_through_conversion_attribution_window_month,0) as conversions, - coalesce(view_through_conversion_attribution_window_month,0) as view_through_conversions + coalesce(clicks, click_through_conversion_attribution_window_month, 0) as conversions, + coalesce(views, view_through_conversion_attribution_window_month, 0) as view_through_conversions {{ fivetran_utils.fill_pass_through_columns('reddit_ads__campaign_country_conversions_passthrough_metrics') }} from fields