Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Copy Existing AdWords Ads With A New Destination URL
function main() {
// change the CampaignName condition to whatever suits you
var adIter ="CampaignName contains WP").withCondition("Status = ENABLED").get();
while(adIter.hasNext()) {
var ad =;
var headline = ad.getHeadline();
var d1 = ad.getDescription1()
var d2 = ad.getDescription2();
var displayUrl = ad.getDisplayUrl();
var dest = "";
var camp = ad.getCampaign();
var adgroup = ad.getAdGroup();
var newAd = adgroup.newTextAdBuilder()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment