Skip to content

Commit

Permalink
[email protected] Fetch only non-hidden accounts from MCC
Browse files Browse the repository at this point in the history
Change-Id: Ie7cb49370d8d00fa5b811617d5c5cff3bf27ad37
  • Loading branch information
evil-shrike committed Oct 2, 2024
1 parent c8ec1e3 commit 1cd5b2b
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 10 deletions.
3 changes: 3 additions & 0 deletions js/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# Changelog
## 2.12.1
* added filtering ouf of hidden accounts while expanding MCC

## 2.12
* support Google Ads API v17.1 (updated google-ads-api to v17.1)

Expand Down
8 changes: 5 additions & 3 deletions js/dist/lib/ads-utils.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion js/dist/lib/ads-utils.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions js/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion js/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "google-ads-api-report-fetcher",
"version": "2.12.0",
"version": "2.12.1",
"description": "Google Ads API Report Fetcher (gaarf)",
"main": "./dist/index.js",
"types": "./src/index.ts",
Expand Down
8 changes: 5 additions & 3 deletions js/src/lib/ads-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,8 @@ export async function getCustomerInfo(
FROM customer_client
WHERE
customer_client.level <= 1
AND customer_client.status = "ENABLED"
AND customer_client.status = ENABLED
AND customer_client.hidden = FALSE
ORDER BY customer_client.level`;
//
const queryText2 = 'SELECT customer.descriptive_name FROM customer';
Expand Down Expand Up @@ -166,8 +167,9 @@ export async function getCustomerIds(
customer_client.id as cid
FROM customer_client
WHERE
customer_client.status = "ENABLED" AND
customer_client.manager = False`;
customer_client.status = ENABLED
AND customer_client.hidden = FALSE
AND customer_client.manager = FALSE`;
if (typeof customerId === 'string') {
customerId = [customerId];
}
Expand Down

0 comments on commit 1cd5b2b

Please sign in to comment.