How to get ACCOUNT_PERFORMANCE_REPORT for manager account?

261 views
Skip to first unread message

tom.wa...@raisingit.com

unread,
Nov 22, 2018, 7:40:56 AM11/22/18
to AdWords API and Google Ads API Forum
Hi there,

I'm trying to pull an account performance report for all the accounts we manage. I'm querying the API using the Python library, using this type of code:

def getMyAccounts(client):
    # Initialize appropriate service.
    report_downloader = client.GetReportDownloader(version="v201809")

    # Create report query.
    report_query = (adwords.ReportQueryBuilder()
                  .Select("ExternalCustomerId", "Impressions")
                  .From("ACCOUNT_PERFORMANCE_REPORT")
                  .During("YESTERDAY")
                  .Build())

When I try to call this function, passing it our manager account for client triggers this error:

AdWordsReportBadRequestError: Type: ReportDefinitionError.CUSTOMER_SERVING_TYPE_REPORT_MISMATCH

which apparently is because I'm using a manager account rather than an individual client account. When I pass an individual client account I just get a single row for that account.

This seems like crazy behaviour: surely the Account Performance Report is, as described in the documentation, for "statistics aggregated by default at the account level, one row per account"
So how do I get more than one account out of this report?

Cheers,
Tom


Dannison Yao (AdWords API Team)

unread,
Nov 22, 2018, 1:26:37 PM11/22/18
to AdWords API and Google Ads API Forum
Hi Tom,

The error CUSTOMER_SERVING_TYPE_REPORT_MISMATCH is encountered because you are using a manager account to run your reports. Reports can only be downloaded on a client level.

The Account Performance Report retrieves metrics on an account level. With this said, it is expected behavior that it would return a single row only not unless you included segments for your account. If you wish to get the report for other client accounts, you have to run the report against the individual client account. If you wish to download reports in the manager account level and get the report for it's client accounts, you may refer to the Parallel Report Download sample code (also available in different languages) on how to do so.

Regards,
Dannison
AdWords API Team

tom.wa...@raisingit.com

unread,
Nov 23, 2018, 10:57:14 AM11/23/18
to AdWords API and Google Ads API Forum
Hi Dannison,

Thanks for explaining the way the ACCOUNT_PERFORMANCE_REPORT works (I understand you could segment the account, but it still seems like funny behaviour to me - most people who want account-level metrics are going to be comparing across accounts, rather than looking for a single one).

But anyway, I have tried to run the sample code for parallel report download in Python, and it doesn't return any results, nor does it throw any error. I've run the sample script "as is" with minimal modifications (just a directory for downloads and the path of our YAML file) on both our production and test accounts, and it doesn't yield anything whatever I do...

This is all the feedback I got:
Retrieving 2 reports with 2 processes:
Finished downloading reports with the following results:

which I guess indicates that both reports_succeeded and reports_failed are coming back empty. Beyond that I'm at a loss - any idea what's up?

Cheers,
Tom

Dannison Yao (AdWords API Team)

unread,
Nov 23, 2018, 1:29:09 PM11/23/18
to AdWords API and Google Ads API Forum
Hi Tom,

Could you provide the sample code and the yaml file you used so I could investigate this further? You may send them to me via the reply privately to author option.

Regards,
Dannison
AdWords API Team

Reply all
Reply to author
Forward
0 new messages