Skip to content

Commit

Permalink
Adjusting date segment
Browse files Browse the repository at this point in the history
  • Loading branch information
GTFalcao committed Jun 25, 2024
1 parent 9673236 commit 2e5655b
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 3 deletions.
9 changes: 6 additions & 3 deletions components/google_ads/actions/create-report/create-report.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,9 @@ export default {
label: "Segments",
description: "Select any segments you want to include in your report. See the documentation [here](https://developers.google.com/google-ads/api/fields/v16/segments)",
options: resource.segments,
default: [
"date",
],
optional: true,
reloadProps: true,
},
Expand Down Expand Up @@ -190,9 +193,9 @@ export default {
const segments = this.segments?.map((i) => `segments.${i}`) ?? [];
const metrics = this.metrics?.map((i) => `metrics.${i}`) ?? [];

if (dateRange && !segments.includes("segments.date")) {
segments.push("segments.date");
}
// if (dateRange && !segments.includes("segments.date")) {
// segments.push("segments.date");
// }

const selection = [
...fields,
Expand Down
1 change: 1 addition & 0 deletions components/google_ads/common/resources/ad.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,7 @@ const segments = [
"conversion_adjustment",
"conversion_lag_bucket",
"conversion_or_adjustment_lag_bucket",
"date",
"device",
"external_conversion_source",
"keyword.ad_group_criterion",
Expand Down
1 change: 1 addition & 0 deletions components/google_ads/common/resources/adGroup.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ const segments = [
"conversion_adjustment",
"conversion_lag_bucket",
"conversion_or_adjustment_lag_bucket",
"date",
"device",
"external_conversion_source",
"hour",
Expand Down
1 change: 1 addition & 0 deletions components/google_ads/common/resources/campaign.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ const segments = [
"conversion_lag_bucket",
"conversion_or_adjustment_lag_bucket",
"conversion_value_rule_primary_dimension",
"date",
"device",
"external_conversion_source",
"hour",
Expand Down
1 change: 1 addition & 0 deletions components/google_ads/common/resources/customer.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ const segments = [
"conversion_lag_bucket",
"conversion_or_adjustment_lag_bucket",
"conversion_value_rule_primary_dimension",
"date",
"device",
"external_conversion_source",
"hour",
Expand Down

0 comments on commit 2e5655b

Please sign in to comment.