Adwords Reporting: Getting Url Custom Parameters

25 views
Skip to first unread message

Christoph Lanz

unread,
Jun 5, 2019, 5:40:24 PM6/5/19
to AdWords API and Google Ads API Forum
Hello,

I am trying to download a campaign report using the ads api reporting feature, using PHP. Among other information I would like to download also the UrlCustomParameters from the campaign, but I am unsure how to build the query for the output. For all other fields I have no issue, for example the following work fine:

$campaign->getEndDate()->getValue()
$campaign->getServingStatus()
$campaign->getStatus()
$metrics->getImpressions()->getValue()

However, for the UrlCustomParamters I get the error "Call to undefined method", when I use the following:
$campaign->getUrlCustomParameters()->getValue()
$campaign->getUrlCustomParameters()->getKey()

What would be the correct query?

Many thanks in advance!

Kind regards,

Christoph

Google Ads API Forum Advisor Prod

unread,
Jun 6, 2019, 3:27:00 AM6/6/19
to adwor...@googlegroups.com
Hi Chirstoph,

You can refer to our reporting guide specifically to the example here on how to structure your reports using the Google Ads API. For retrieving the url custom parameters field, you can include the ad_group_ad.ad.url_custom_parameters field in your SELECT query. Let me know if this helps.

Thanks and regards,
Peter
Google Ads API Team

ref:_00D1U1174p._5001UBlkAs:ref

Christoph Lanz

unread,
Jun 7, 2019, 9:59:43 AM6/7/19
to AdWords API and Google Ads API Forum
Hi Peter,

Great, that worked for me! Many thanks and have a nice day,

Christoph
Reply all
Reply to author
Forward
0 new messages