Add Custom Parameters on Keyword Level

153 views
Skip to first unread message

s...@feedonomics.com

unread,
Jan 10, 2017, 7:35:23 PM1/10/17
to AdWords API Forum
How do we add a custom-parameter/tracking-template on the Keyword level?

We're currently creating Final URLs for our Expanded Text Ads using "$expandedTextAd->finalUrls = $finalUrls;"

And an example shows how to add custom parameters on the Ad level:
  $expandedTextAd->urlCustomParameters = new CustomParameters();
  $expandedTextAd->urlCustomParameters->parameters = array($seasonParameter,
      $promoCodeParameter);

But how do we add custom parameters at the Keyword level? There's an example here, under "Create or edit custom parameters at the ad group or keyword level", which is what we need, but I'm not quite sure how to do it in our API script.

Thanks!

Peter Oliquino

unread,
Jan 10, 2017, 9:56:56 PM1/10/17
to AdWords API Forum
Hi,

You can set CustomParameters for your keyword via the AdGroupCriterionService. The UrlCustomParameters field can be found under the BiddableAdGroupCriterion fields. I hope this helps.

Best regards,
Peter
AdWords API Team

s...@feedonomics.com

unread,
Jan 11, 2017, 11:19:55 AM1/11/17
to AdWords API Forum
Hi Peter,

Thanks. Do you know if we could set final URLs at the keyword level, and how to do it?

Best,
Sam

Peter Oliquino

unread,
Jan 11, 2017, 10:41:26 PM1/11/17
to AdWords API Forum
Hi Sam,

Yes, much like the urlCustomParameters, you may set the finalUrls field of your BiddableAdGroupCriterion using the AdGroupCriterionService. You may find the sample code in the AddKeywords and UpdateKeyword PHP examples in the client library.

s...@feedonomics.com

unread,
Jan 12, 2017, 6:06:21 PM1/12/17
to AdWords API Forum
Thank you!
Reply all
Reply to author
Forward
0 new messages