Is there a way to do this? attached image

34 views
Skip to first unread message

ken...@blvnp.com

unread,
Jan 9, 2018, 6:35:20 AM1/9/18
to AdWords API Forum






Is the above image possible in Google Adwords API in PHP? Probably using AWQL?

Bharani Cherukuri (AdWords API Team)

unread,
Jan 9, 2018, 2:59:09 PM1/9/18
to AdWords API Forum
Hello, 

I see that you're trying to pull the report at the campaign level with one row per campaign by querying for the specific ad groups. I'm afraid, there is no direct way to pull a report with these fields through the API. The closest we have is the AdGroup Performance Report, which included statistics with one row per AdGroup. You will be able to query for the specific ad groups and retrieve their CampaignId and CampaignName. Please find a sample report query below for the same:

"SELECT CampaignId, CampaignName, AdGroupId, AdGroupName FROM ADGROUP_PERFORMANCE_REPORT WHERE AdGroupId = 47340428352"

Please note that this query will only return the Campaign row associated with that ad group. 

Regards,
Bharani, AdWords API Team

Ken Dan Tinio

unread,
Jan 18, 2018, 2:48:44 AM1/18/18
to AdWords API Forum
I already solved my problem. Here is what I did.


        // Create report query to get the data for last 7 days.
        $reportQuery = 'SELECT CampaignId, AdGroupId, Id, Criteria, CriteriaType, '
            . 'Impressions, Clicks, Cost FROM CRITERIA_PERFORMANCE_REPORT '
            . 'WHERE Status IN [ENABLED, PAUSED] AND Criteria IN ["fb.com", "tinder.com"] DURING LAST_7_DAYS';

Bharani Cherukuri (AdWords API Team)

unread,
Jan 18, 2018, 10:05:08 AM1/18/18
to AdWords API Forum
Hello, 

I'm glad that your issue has been resolved. Feel free to write back to us if you have any other questions. 

Ken Dan Tinio

unread,
Jan 18, 2018, 7:15:45 PM1/18/18
to AdWords API Forum
Yes, thanks for helping me out! :)
Reply all
Reply to author
Forward
0 new messages