Skip to content

Commit

Permalink
Dashboard colors and "Meta" string hardcoded changes (#4)
Browse files Browse the repository at this point in the history
* Changed to "Facebook" as string on derived table

* fix: changed colors to make more sense

* Changed "Facebook" string to "Meta" on view and DT

* fix: core_metrics dashboard set impressions goal filter works as expected now
  • Loading branch information
CsarSainz authored Jan 14, 2025
1 parent 5c5b7cc commit ffa54be
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 60 deletions.
69 changes: 32 additions & 37 deletions dashboards/campaign_manager.dashboard.lookml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
layout: newspaper
preferred_viewer: dashboards-next
description: ''
preferred_slug: LpNUc4vomVE8qUYAq2DIAV
preferred_slug: CxGpfZFvkkzx6V9plbYeMH
elements:
- title: Total Spend
name: Total Spend
Expand Down Expand Up @@ -63,7 +63,6 @@
- name: ''
type: text
title_text: ''
subtitle_text: ''
body_text: |-
<div style="border-bottom: solid 1px #4285F4;">
Expand Down Expand Up @@ -748,11 +747,10 @@
model: pacing_block
explore: multisource_ads
type: looker_column
fields: [multisource_ads.CTR, multisource_ads.ad_source, ad_source]
pivots: [multisource_ads.ad_source]
fields: [multisource_ads.CTR, multisource_ads.ad_source]
filters:
multisource_ads.KPI_select: total^_impressions
sorts: [multisource_ads.ad_source, multisource_ads.CTR desc 0]
sorts: [multisource_ads.CTR desc]
limit: 5
column_limit: 50
dynamic_fields:
Expand All @@ -772,7 +770,7 @@
y_axis_tick_density: default
y_axis_tick_density_custom: 5
show_x_axis_label: false
show_x_axis_ticks: false
show_x_axis_ticks: true
y_axis_scale_mode: linear
x_axis_reversed: false
y_axis_reversed: false
Expand All @@ -797,8 +795,9 @@
x_axis_zoom: true
y_axis_zoom: true
hidden_series: []
font_size: ''
series_colors:
multisource_ads.CTR: "#009c8c"
multisource_ads.CTR: "#34A853"
GAds - SEARCH_PARTNERS - multisource_ads.CTR: "#FEEFC3"
GAds - UNKNOWN - multisource_ads.CTR: "#D2E3FC"
GAds - UNSPECIFIED - multisource_ads.CTR: "#FAD2CF"
Expand Down Expand Up @@ -833,18 +832,17 @@
Campaign Name: multisource_ads.campaign_name
row: 18
col: 0
width: 6
height: 9
width: 12
height: 6
- title: CPM by Source
name: CPM by Source
model: pacing_block
explore: multisource_ads
type: looker_column
fields: [multisource_ads.CPM, multisource_ads.ad_source, ad_source]
pivots: [multisource_ads.ad_source]
fields: [multisource_ads.CPM, multisource_ads.ad_source]
filters:
multisource_ads.KPI_select: total^_impressions
sorts: [multisource_ads.ad_source, multisource_ads.CPM desc 0]
sorts: [multisource_ads.ad_source, multisource_ads.CPM desc]
limit: 5
column_limit: 50
dynamic_fields:
Expand All @@ -864,7 +862,7 @@
y_axis_tick_density: default
y_axis_tick_density_custom: 5
show_x_axis_label: false
show_x_axis_ticks: false
show_x_axis_ticks: true
y_axis_scale_mode: linear
x_axis_reversed: false
y_axis_reversed: false
Expand Down Expand Up @@ -895,7 +893,7 @@
y_axis_zoom: true
series_colors:
multisource_ads.CTR: "#34A853"
multisource_ads.CPM: "#06402b"
multisource_ads.CPM: "#34A853"
GAds - SEARCH_PARTNERS - multisource_ads.CPM: "#FEEFC3"
GAds - UNKNOWN - multisource_ads.CPM: "#D2E3FC"
GAds - UNSPECIFIED - multisource_ads.CPM: "#FAD2CF"
Expand Down Expand Up @@ -931,18 +929,17 @@
Campaign Name: multisource_ads.campaign_name
row: 18
col: 12
width: 6
height: 9
width: 12
height: 6
- title: CPC by Source
name: CPC by Source
model: pacing_block
explore: multisource_ads
type: looker_column
fields: [multisource_ads.CPC, multisource_ads.ad_source, ad_source]
pivots: [multisource_ads.ad_source]
fields: [multisource_ads.CPC, multisource_ads.ad_source]
filters:
multisource_ads.KPI_select: total^_impressions
sorts: [multisource_ads.ad_source, multisource_ads.CPC desc 0]
sorts: [multisource_ads.ad_source, multisource_ads.CPC desc]
limit: 5
column_limit: 50
dynamic_fields:
Expand All @@ -962,7 +959,7 @@
y_axis_tick_density: default
y_axis_tick_density_custom: 5
show_x_axis_label: false
show_x_axis_ticks: false
show_x_axis_ticks: true
y_axis_scale_mode: linear
x_axis_reversed: false
y_axis_reversed: false
Expand All @@ -988,7 +985,7 @@
y_axis_zoom: true
series_colors:
multisource_ads.CTR: "#34A853"
multisource_ads.CPC: "#111184"
multisource_ads.CPC: "#34A853"
GAds - SEARCH_PARTNERS - multisource_ads.CPC: "#FEEFC3"
GAds - UNKNOWN - multisource_ads.CPC: "#D2E3FC"
GAds - UNSPECIFIED - multisource_ads.CPC: "#FAD2CF"
Expand Down Expand Up @@ -1021,20 +1018,19 @@
Ad Source: multisource_ads.ad_source
Date: multisource_ads.partition_date_date
Campaign Name: multisource_ads.campaign_name
row: 18
col: 6
width: 6
height: 9
row: 24
col: 0
width: 12
height: 6
- title: Conversion Rate by Source
name: Conversion Rate by Source
model: pacing_block
explore: multisource_ads
type: looker_column
fields: [multisource_ads.conversion_rate, multisource_ads.ad_source, ad_source]
pivots: [multisource_ads.ad_source]
fields: [multisource_ads.conversion_rate, multisource_ads.ad_source]
filters:
multisource_ads.KPI_select: total^_impressions
sorts: [multisource_ads.ad_source, multisource_ads.conversion_rate desc 0]
sorts: [multisource_ads.conversion_rate desc]
limit: 5
column_limit: 50
dynamic_fields:
Expand All @@ -1054,7 +1050,7 @@
y_axis_tick_density: default
y_axis_tick_density_custom: 5
show_x_axis_label: false
show_x_axis_ticks: false
show_x_axis_ticks: true
y_axis_scale_mode: linear
x_axis_reversed: false
y_axis_reversed: false
Expand Down Expand Up @@ -1083,7 +1079,7 @@
series_colors:
multisource_ads.CTR: "#34A853"
multisource_ads.CPC: "#34A853"
multisource_ads.conversion_rate: "#54664a"
multisource_ads.conversion_rate: "#34A853"
GAds - SEARCH_PARTNERS - multisource_ads.conversion_rate: "#FEEFC3"
GAds - UNKNOWN - multisource_ads.conversion_rate: "#D2E3FC"
GAds - UNSPECIFIED - multisource_ads.conversion_rate: "#FAD2CF"
Expand Down Expand Up @@ -1117,10 +1113,10 @@
Ad Source: multisource_ads.ad_source
Date: multisource_ads.partition_date_date
Campaign Name: multisource_ads.campaign_name
row: 18
col: 18
width: 6
height: 9
row: 24
col: 12
width: 12
height: 6
- title: Conversion rate
name: Conversion rate
model: pacing_block
Expand Down Expand Up @@ -1179,7 +1175,6 @@
- name: Scorecards
type: text
title_text: Scorecards
subtitle_text: ''
body_text: ''
row: 3
col: 0
Expand Down Expand Up @@ -1280,7 +1275,7 @@
Ad Source: multisource_ads.ad_source
Date: multisource_ads.partition_date_date
Campaign Name: multisource_ads.campaign_name
row: 27
row: 30
col: 0
width: 24
height: 7
Expand Down Expand Up @@ -1379,7 +1374,7 @@
Ad Source: multisource_ads.ad_source
Date: multisource_ads.partition_date_date
Campaign Name: multisource_ads.campaign_name
row: 34
row: 37
col: 0
width: 24
height: 7
Expand Down
28 changes: 7 additions & 21 deletions dashboards/core_metrics.dashboard.lookml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,11 @@
layout: newspaper
preferred_viewer: dashboards-next
description: ''
preferred_slug: nrsq454TklMs83hYXNAD0n
preferred_slug: ccNKlUQavDD4guqbKBSsZm
elements:
- name: ''
type: text
title_text: ''
subtitle_text: ''
body_text: "<div style=\"border-bottom: solid 1px #4285F4;\">\n\n<nav style=\"\
font-size: 18px; padding: 5px 10px 0 10px; height: 60px\">\n \n\n <a style=\"\
padding: 5px 15px; border-top: solid 1px #4285F4; border-left: solid 1px #4285F4;\
Expand All @@ -20,7 +19,8 @@
\ solid 1px #4285F4; float: left; line-height: 40px;\" href=\"/dashboards/pacing_block::campaign_comparison\"\
> Marketing Campaign Comparison </a>\n\n <a style=\"padding: 5px 15px;\
\ border-bottom: solid 1px #4285F4; float: left; line-height: 40px;\" href=\"\
/dashboards/pacing_block::spend_revenue\"> Spend & Revenue </a>\n\n</nav>\n\n</div>"
/dashboards/pacing_block::spend_revenue\"> Spend & Revenue </a>\n\n</nav>\n\n\
</div>"
row: 0
col: 0
width: 23
Expand Down Expand Up @@ -49,7 +49,6 @@
Ad Source: multisource_ads.ad_source
Date: multisource_ads.partition_date_date
Campaign Name: multisource_ads.campaign_name
Set Conversions Goal: multisource_ads.set_conversions_goal
row: 3
col: 1
width: 7
Expand Down Expand Up @@ -80,7 +79,6 @@
Ad Source: multisource_ads.ad_source
Date: multisource_ads.partition_date_date
Campaign Name: multisource_ads.campaign_name
Set Conversions Goal: multisource_ads.set_conversions_goal
row: 3
col: 8
width: 7
Expand Down Expand Up @@ -111,7 +109,6 @@
Ad Source: multisource_ads.ad_source
Date: multisource_ads.partition_date_date
Campaign Name: multisource_ads.campaign_name
Set Conversions Goal: multisource_ads.set_conversions_goal
row: 3
col: 15
width: 7
Expand All @@ -122,7 +119,6 @@
explore: multisource_ads
type: marketplace_viz_radial_gauge::radial_gauge-marketplace
fields: [multisource_ads.clicks, multisource_ads.clicks_goal]
filters: {}
limit: 500
column_limit: 50
hidden_fields: []
Expand Down Expand Up @@ -185,10 +181,9 @@
defaults_version: 0
listen:
Ad Source: multisource_ads.ad_source
Set Clicks Goal: multisource_ads.set_clicks_goal
Date: multisource_ads.partition_date_date
Campaign Name: multisource_ads.campaign_name
Set Conversions Goal: multisource_ads.set_conversions_goal
Set Clicks Goal: multisource_ads.set_clicks_goal
row: 11
col: 1
width: 7
Expand All @@ -199,7 +194,6 @@
explore: multisource_ads
type: marketplace_viz_radial_gauge::radial_gauge-marketplace
fields: [multisource_ads.conversions, multisource_ads.conversions_goal]
filters: {}
limit: 500
column_limit: 50
hidden_fields: []
Expand Down Expand Up @@ -268,7 +262,6 @@
hidden_pivots: {}
listen:
Ad Source: multisource_ads.ad_source
Set Clicks Goal: multisource_ads.set_impressions_goal
Date: multisource_ads.partition_date_date
Campaign Name: multisource_ads.campaign_name
Set Conversions Goal: multisource_ads.set_conversions_goal
Expand All @@ -282,7 +275,6 @@
explore: multisource_ads
type: marketplace_viz_radial_gauge::radial_gauge-marketplace
fields: [multisource_ads.impressions, multisource_ads.impressions_goal]
filters: {}
limit: 500
column_limit: 50
hidden_fields: []
Expand Down Expand Up @@ -351,10 +343,9 @@
hidden_pivots: {}
listen:
Ad Source: multisource_ads.ad_source
Set Clicks Goal: multisource_ads.set_impressions_goal
Date: multisource_ads.partition_date_date
Campaign Name: multisource_ads.campaign_name
Set Conversions Goal: multisource_ads.set_conversions_goal
Set Impressions Goal: multisource_ads.set_impressions_goal
row: 11
col: 8
width: 7
Expand All @@ -365,7 +356,6 @@
explore: multisource_ads
type: single_value
fields: [multisource_ads.clicks, multisource_ads.clicks_goal]
filters: {}
limit: 500
column_limit: 50
custom_color_enabled: true
Expand Down Expand Up @@ -438,10 +428,9 @@
defaults_version: 1
listen:
Ad Source: multisource_ads.ad_source
Set Clicks Goal: multisource_ads.set_clicks_goal
Date: multisource_ads.partition_date_date
Campaign Name: multisource_ads.campaign_name
Set Conversions Goal: multisource_ads.set_conversions_goal
Set Clicks Goal: multisource_ads.set_clicks_goal
row: 7
col: 1
width: 7
Expand All @@ -452,7 +441,6 @@
explore: multisource_ads
type: single_value
fields: [multisource_ads.impressions, multisource_ads.impressions_goal]
filters: {}
limit: 500
column_limit: 50
custom_color_enabled: true
Expand Down Expand Up @@ -526,10 +514,9 @@
hidden_pivots: {}
listen:
Ad Source: multisource_ads.ad_source
Set Clicks Goal: multisource_ads.set_impressions_goal
Date: multisource_ads.partition_date_date
Campaign Name: multisource_ads.campaign_name
Set Conversions Goal: multisource_ads.set_conversions_goal
Set Impressions Goal: multisource_ads.set_impressions_goal
row: 7
col: 8
width: 7
Expand All @@ -540,7 +527,6 @@
explore: multisource_ads
type: single_value
fields: [multisource_ads.conversions, multisource_ads.conversions_goal]
filters: {}
limit: 500
column_limit: 50
custom_color_enabled: true
Expand Down
2 changes: 1 addition & 1 deletion views/fb_ads_views/base_views/ad_insights.view.lkml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ view: ad_insights {
dimension: ad_source {
description: "Dummy data, using just facebook at the moment"
type: string
sql: "Facebook" ;;
sql: "Meta" ;;
}
dimension: buying_type {
description: "The method by which you pay for and target ads in your campaigns: through dynamic auction bidding,
Expand Down
2 changes: 1 addition & 1 deletion views/fb_ads_views/derived_views/dt_fb_ads.view.lkml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ sql:
ad_insights.CampaignName AS campaign_name,
ad_insights.AdSetId AS ad_set_id,
ad_insights.AdSetName AS ad_set_name,
ad_insights.meta_ads_source AS ad_source,
"Meta" AS ad_source,
ad_insights.AdId AS ad_id,
ad_insights.AdName AS ad_name,
ROUND(COALESCE(CAST( ( SUM(DISTINCT (CAST(ROUND(COALESCE( ad_insights.Spend ,0)*(1/1000*1.0), 9) AS NUMERIC) + (cast(cast(concat('0x', substr(to_hex(md5(CAST( ad_insights.primary_key AS STRING))), 1, 15)) as int64) as numeric) * 4294967296 + cast(cast(concat('0x', substr(to_hex(md5(CAST( ad_insights.primary_key AS STRING))), 16, 8)) as int64) as numeric)) * 0.000000001 )) - SUM(DISTINCT (cast(cast(concat('0x', substr(to_hex(md5(CAST( ad_insights.primary_key AS STRING))), 1, 15)) as int64) as numeric) * 4294967296 + cast(cast(concat('0x', substr(to_hex(md5(CAST( ad_insights.primary_key AS STRING))), 16, 8)) as int64) as numeric)) * 0.000000001) ) / (1/1000*1.0) AS NUMERIC), 0), 6) AS total_spent,
Expand Down

0 comments on commit ffa54be

Please sign in to comment.