Google Ads API is returning to beta status. Please read our blog post for more details.

Feed Item Targeting

You can use the FeedItemTargetService to restrict individual feed items to only target specific campaigns, ad groups, or criteria. Targeting in this way is restrictive only, meaning that the entity you are targeting needs to already be included in the previously set up matching function.

The criteria types supported in FeedItemTarget are location, device, and ad schedule. No other criteria types can be targeted this way.

For example, to restrict a specific feed item to only apply on mobile devices:

Ruby

client = Google::Ads::GoogleAds::GoogleAdsClient.new

feed_item_target = client.resource.feed_item_target do |fit|
  fit.feed_item = feed_item_resource_name
  fit.device = :MOBILE
end

operation = client.operation.create_resource.feed_item_target(feed_item_target)

response = client.service.feed_item_target.mutate_feed_item_targets(customer_id, [operation])