googleads / googleads-php-lib

Google Ad Manager SOAP API Client Library for PHP
Apache License 2.0
656 stars 769 forks source link

What example pulls the total account spend over a time period? #403

Closed brod-ie closed 6 years ago

brod-ie commented 6 years ago

We're building an internal reporting tool that'll state how much we've spent that day, week, or month advertising on Google

I've tried three examples but none are pulling out the Cost column for campaigns, ideally I can have this value for the whole account

Can you point me to an example that can achieve this?

thangduo commented 6 years ago

Hi Ryan Ryan Brodie,

Are you referring to AdWords or DFP?

Thanks, Thang Duong

brod-ie commented 6 years ago

@thangduo Thanks for your prompt response 😊

AdWords, we're approved for basic access too and I can successfully pull data using the examples, just not the data I need!

fiboknacky commented 6 years ago

Hello Ryan,

I guess you've tried DownloadCriteriaReportWithSelector.php already?

Based on what you described, you probably just need to add a report field "Cost" to your report definition.

If you need further help on this, I recommend to post on AdWords API Forum, as it's more related to the AdWords API in general.

Best, Knack

brod-ie commented 6 years ago

@fiboknacky I have and I get an empty report:

cat criteria-report-XXXXXX.csv

"Criteria performance report #XXXXXXXXXXX (Nov 22, 2017-Nov 28, 2017)"
Campaign ID,Ad group ID,Keyword ID,Keyword / Placement,Criteria Type,Impressions,Clicks,Cost
Total, --, --, --, --,0,0,0

However when I use the other campaign examples I correctly see our two running campaigns.

fiboknacky commented 6 years ago

There can be many factors that make your report empty. Could you please ask in the AdWords API Forum. There will be our specialized team helping on that. :)