Create ad extensions globally

54 views
Skip to first unread message

Giovanni Cortes

unread,
Jun 26, 2015, 12:48:41 PM6/26/15
to adwor...@googlegroups.com
There is a way to create Ad extensions, for example callout, without assign to a campaign or ad group?

For example, I want to create 3 ad extensions but no assign to a campaign or ad group. Then I want to retrieve the ad extension and assign to a campaign, like the AdWords site, they create callout individually and then assign it to a campaign.

Example:

createCallout(args) 
createCallout(args)
createCallout(args)

retrieveCallout(id)

create calloutCampaign():
      callout = retrieveCallout(id)
      callout2 = retrieveCallout(id)

      feed_service = self.client.GetService(
            'AdGroupExtensionSettingService'
        )

        operation = [{
            'operator': 'ADD',
            'operand': {
                'adGroupId': ad_group_id,
                'extensionType': 'CALLOUT',
                'extensionSetting': {
                    'extensions': [callout, callout2]
                }
            }
        }]


There is a way to do this with python?

Josh Radcliff (AdWords API Team)

unread,
Jun 26, 2015, 3:24:43 PM6/26/15
to adwor...@googlegroups.com, m...@giovannicortes.com
Hi,

You can do this using the new extension setting services as follows:
  1. Use CampaignExtensionSettingService to create a CampaignExtensionSetting with campaignId = your_campaign_idextensionType = CALLOUT, and extensionSetting set to an ExtensionSetting whose extensions consists of a CalloutFeedItem. This will add the callout extension to one of your campaigns.
  2. From the response of that call, capture the CalloutFeedItem feedId and feedItemId
  3. To add the same extension to another campaign, repeat step 1, but when creating the CalloutFeedItem, simply set the feedId and feedItemId to the values you captured in step 2 and leave all other fields unset. This will reuse the CalloutFeedItem you created in step 1 within the 2nd campaign.
For a similar example that works with sitelinks instead of callout extensions, see the AddSitelinks.php sample in github.

Cheers,
Josh, AdWords API Team

Josh Radcliff (AdWords API Team)

unread,
Jun 26, 2015, 3:26:21 PM6/26/15
to adwor...@googlegroups.com, adwordsapia...@google.com, m...@giovannicortes.com
Hi,

One other point: if you want to use the same callout extension across all of your campaigns and ad groups, you can simply create it once via CustomerExtensionSettingService. This would be similar to step 1 below, but you won't specify a campaignId.

Cheers,
Josh, AdWords API Team

Giovanni Cortes

unread,
Jun 26, 2015, 4:11:21 PM6/26/15
to Josh Radcliff (AdWords API Team), adwor...@googlegroups.com
Hi Josh!

Yes, I know the how works and I have done my functions for add callouts to campaigns, customer and ad groups. But for example, if I want to add a new Callout I have to update the CustomerExtensionSettingService and add the new callout and find a way to save the old callouts and then adding with the new callout and there is not a way to obtains the ENABLED callouts, but Google Adwords are saving.


Imagen integrada 1


Thank you. 
--
Angel Giovanni Cortes Solorzano
-----------------------------------------------------------------------
iOS & Django Developer

Josh Radcliff (AdWords API Team)

unread,
Jun 29, 2015, 10:55:39 AM6/29/15
to adwor...@googlegroups.com, m...@giovannicortes.com, adwordsapia...@google.com
Hi,

Could you re-word your question? I don't quite understand the issue you're encountering.

Thanks,
Josh, AdWords API Team

Reply all
Reply to author
Forward
0 new messages