How can to get values all campaign?

11 views
Skip to first unread message

Ngọc Anh

unread,
Nov 30, 2016, 11:58:48 PM11/30/16
to AdWords API Forum
Hi every one.

I'm  learning Adwords API. I'm doing Adwords custom reports. I want to get the value of the campaign: click, views...

I connected Adwords API and get basic values : Name, Status, EndDate.. But I want click, views ... all campaign.

"$campaignService = $user->GetService('CampaignService', ADWORDS_VERSION);"

My plan: to get the file report, then read file and retrieve data.

I need help with ideas and guidance.

My English is bad, please forgive.

Thank you very much.

My report:


gg2.jpg
gg.jpg

Joyce Lava

unread,
Dec 1, 2016, 12:40:24 AM12/1/16
to AdWords API Forum
Hello,

Your English is very good so do not worry. :)

You may run the Campaign Performance Report using the AdWords API. The sample codes and the reporting basics should give you more ideas on generating the report. Additionally, you may find the various API reports in this page.

Regards,
Joyce, AdWords API Team

Ngọc Anh

unread,
Dec 1, 2016, 2:26:45 AM12/1/16
to AdWords API Forum
Thank Joyce Lava. ^_^

I can export file report and read file to get data. But Is there a way not to reread the file, ex: get data and push in array .

I have html and i need data simply to pour into.

Thank you again. ^_^

Joyce Lava

unread,
Dec 1, 2016, 3:07:16 AM12/1/16
to AdWords API Forum
Hello,

What I am aware of is to get the data in string. For Java client library, you can use the getAsString() method of the ReportDownloadResponse. Since you seemed to be using the PHP client library, you may try to set the filePath as NULL and this should give the report data as string. Please let me know the results once done.

Thanks,
Joyce, AdWords API Team

Ngọc Anh

unread,
Dec 1, 2016, 3:13:45 AM12/1/16
to AdWords API Forum
Hi Joyce Lava.

I will try it.

Thank you ^_^.
Reply all
Reply to author
Forward
0 new messages