Fetch account with running/active campaign only in ManagedCustomerService

38 views
Skip to first unread message

ni...@rnf.tech

unread,
Mar 14, 2016, 8:29:34 AM3/14/16
to AdWords API Forum
Hi,

I want to fetch only those accounts who has running campaign or active status only. Currently my account consists of a number of customer who either doesn't server any campaign or have inactive status, I want to exclude all of them. I am using php api to interact with MCC account.

Please find the attached file for sample code. 

GetAccountHierarchy.php

Umesh Dengale

unread,
Mar 14, 2016, 3:02:55 PM3/14/16
to AdWords API Forum
Hello,

The ManagedCustomerService could be used to get all accounts in the MCC based on campaign status. You could use CAMPAIGN_PERFORMANCE_REPORT which gives statistics aggregated by default at the campaign level. The report has CustomerDescriptiveName
CampaignStatus fields. The report data could be filtered based on CampaignStatus(e.g. ENABLED, PAUSED, REMOVED etc.). You need to run a CAMPAIGN_PERFORMANCE_REPORT report for each account in your MCC separately. If you need to gather reporting data for multiple accounts, submit a separate CAMPAIGN_PERFORMANCE_REPORT report request for each account by setting the clientCustomerId header. Please check out CAMPAIGN_PERFORMANCE_REPORT and  Reporting on multiple accounts section of the reporting basics guide.

Thanks,
Umesh, AdWords API Team.
Reply all
Reply to author
Forward
0 new messages