Is there a way to duplicate / clone a whole campaign via API ?

783 views
Skip to first unread message

Berry

unread,
Nov 3, 2014, 12:18:46 PM11/3/14
to adwor...@googlegroups.com
Is there a way to duplicate / clone a whole campaign via API?

I'd like to create certain campaigns manually, and then clone each campaign without the need to update the creation code every time the "template" campaign changes.

is that possible?  and how?


thank you.

Berry

unread,
Nov 4, 2014, 12:37:53 PM11/4/14
to adwor...@googlegroups.com
(BTW: this functionallity exists in the UI as "copy-paste")

Josh Radcliff (AdWords API Team)

unread,
Nov 4, 2014, 4:52:14 PM11/4/14
to adwor...@googlegroups.com
Hi,

The API does not have specific clone functionality. However, you could approximate this functionality by issuing a CampaignService.get with all relevant fields in the Selector, changing the name of the returned object, and then passing it back into a CampaignService.mutate call with operator = ADD. This would only make a "shallow" copy of the campaign, however. You would have to repeat this process using other services if you also wanted to clone objects related to the template campaign, such as ad groups or negative keyword criteria.

Cheers,
Josh, AdWords API Team

Berry

unread,
Nov 5, 2014, 7:29:51 AM11/5/14
to adwor...@googlegroups.com
again my incomplete question:

By copying an existing campaign I wanted to working around the inability to set by API certain targeting options and certain campaign settings.

Thus the suggested method wouldn't work for my objective, if I get it correctly.

Josh Radcliff (AdWords API Team)

unread,
Nov 5, 2014, 3:06:37 PM11/5/14
to adwor...@googlegroups.com
Hi,

That's true -- if there are features in the template campaign that are not settable by the API, then my approach won't work.

I'm curious: which targeting options or campaign settings that you need are not settable via the API?

Thanks,
Josh, AdWords API Team

Berry

unread,
Nov 6, 2014, 4:42:16 AM11/6/14
to adwor...@googlegroups.com
i already asked about them in this group:
  • campaign sub-type ("ads in mobile apps")
  • wifi networks (hence my other question you answered - i speculated whether targeting "all carriers" implicitly excludes "wifi")


  • BTW duplicating campaign, by itself could be a nice feature: most of the campaigns i'm working with are very similar.  using a campaign as a template might have saved some coding and debugging (maybe also performance hits).
  • other feature that i miss, if we're already opening this subject, is the ability to fully dump a campaign via the API - see all its settings,
thank you

Josh Radcliff (AdWords API Team)

unread,
Nov 6, 2014, 3:59:48 PM11/6/14
to adwor...@googlegroups.com
Hi,

Regarding ads in mobile apps, you can achieve the same setup as in the UI if you create a campaign with advertisingChannelType DISPLAY, and then:

1. At the campaign level create CampaignCriterion where the criterion is the OperatingSystemVersion you want to target (see the list of mobile platforms).
2. On the campaign's ad group add a BiddableAdGroupCriterion where the criterion is a MobileAppCategory or a MobileApplication. For MobileAppCategory, you would set the mobileAppCategoryId to one of the values listed on our reference page.

I've noted the issue with the Wifi carrier ID and we're investigating.

Cheers,
Josh, AdWords API Team
Reply all
Reply to author
Forward
0 new messages