How do I get extensions for a campaign that are set via CampaignFeedService?

55 views
Skip to first unread message

JC Lee

unread,
Jan 19, 2017, 5:45:43 PM1/19/17
to AdWords API Forum
Hi,

I am using the latest PHP library (v25) but this question should be about the API itself.

Say I have created a feed using the API or AdWords, and added them to a campaign using CampaignFeedService or via the AdWords interface, how do I get the extensions that are currently active on the campaign?

I can see that CampaignFeedService uses a Matching Function to filter the extensions from a feed, but how do I get the results of the filter?

Thanks!

Peter Oliquino

unread,
Jan 19, 2017, 10:49:12 PM1/19/17
to AdWords API Forum
Hi JC,

To get the list of active feeds (currently serving) that were added to a specific campaign, you could use the CampaignFeedService.get and use the CampaignId field and Status (with ENABLED as its value) field as the filters. Let me know if this works for you.

Thanks and regards,
Peter Laurence N. Oliquino
AdWords API Team

JC Lee

unread,
Jan 19, 2017, 11:12:41 PM1/19/17
to AdWords API Forum
Hi Peter,

It sounds like that gets the Feed but not the FeedItems. How do I get the individual FeedItems that are active on the campaign?

I need to be able to display the feed items internally in my app's interface.

Peter Oliquino

unread,
Jan 20, 2017, 12:19:03 AM1/20/17
to AdWords API Forum
Hi JC,

Apologies as I should have included this in my previous reply. Once you get the list of FeedIds associated to your campaign, you can then use the FeedItemService.get to retrieve the list of feed items.

JC Lee

unread,
Jan 20, 2017, 12:44:36 AM1/20/17
to AdWords API Forum
Hi Peter,

By doing that, I was able to get all the feed items in the feed but I am unable to filter the specific items that are associated with the campaign.

To illustrate

FeedItems in Feed:
  1. Callout1
  2. Callout2
FeedItem that is active in Campaign A:
  1. Callout1
I need to get only Callout1 but now I am getting Callout1 and Callout2. AdWords probably does this with the matching function, but how do I get the results of the matching function without writing an interpreter?

Peter Oliquino

unread,
Jan 20, 2017, 1:17:30 AM1/20/17
to AdWords API Forum
Hi JC,

Could you confirm if you created the Callout1 feed item using the AdWords UI? If yes, then what you need to use will be the CampaignExtensionSettingService. For feeds created via the AdWords API, you will have to make use of the different feed services.

Cheers,
Peter
AdWords API Team

JC Lee

unread,
Jan 20, 2017, 2:48:09 AM1/20/17
to AdWords API Forum
Thanks, I was able to get the active extensions using CampaignExtensionSettingService.

For feeds created via the AdWords API, you will have to make use of the different feed services.

Just to clarify, as this is important for me. I am building an application to create and manage campaigns. And these campaigns may have been created via AdWords UI.

What you stated above does not restrict me from adding FeedItems, using the API, into the feeds created via the UI right?

For a Campaign that is created from the AdWords UI and with extensions added via the UI, is there a particular service that I must use in order to manage its extensions? I assume I should not use FeedServices to manage these campaigns. 

If possible, I would like to use ExtensionSettingServices exclusively (without FeedServices).

Peter Oliquino

unread,
Jan 20, 2017, 3:31:02 AM1/20/17
to AdWords API Forum
Hi JC,

For your question regarding adding feed items to feeds created via the AdWords UI, you can do so using the FeedItemService. The CampaignExtensionSettingService and CampaignFeedService are services that associate your feeds/feed items to campaigns.

For campaign extensions created via the AdWords UI, you may use the CampaignExtensionSettingService to maintain them. I hope this has been helpful.

Thanks and regards,
Peter
AdWords API Team
Reply all
Reply to author
Forward
0 new messages