Can I adGroupAdService Mutate to migrate to Upgraded URLs?

30 views
Skip to first unread message

Eternal Fool

unread,
Jun 12, 2015, 2:27:18 AM6/12/15
to adwor...@googlegroups.com
I have used the UrlUpgrade.java as mentioned here(https://developers.google.com/adwords/api/docs/guides/upgraded-urls) for normal migration.

But I need to change a few urls due to special characters in them and hence can't use Upgraded Url method for that.

How do I used AdGroupAdService.mutate for this?

This is my existing code.

adGroupAd.set(adGroupId)
adGroupAd.set(status)
ad.setUrl(")
ad.setFinalUrl(finalUrl.com)
ad.setTrackingTemplate(trackingTemplate)
adGroupAd.setAd(ad)

AdGroupAdOperation operation = new AdGroupAdOperation();
operation.setOperator(Operator.SET);
operation.setOperand(adGroupAd);

Is this the wrong way to proceed?

Note(I am unable to use finalUrl here because the urls are NOT equivalent)

Josh Radcliff (AdWords API Team)

unread,
Jun 12, 2015, 1:00:47 PM6/12/15
to adwor...@googlegroups.com, shashwa...@sokrati.com
Hi,

In that case, you will have to REMOVE the existing AdGroupAd and then ADD a new AdGroupAd with the upgraded URLs. This will be similar to the code example shown here.

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