Re: How to update TextAd parameters

300 views
Skip to first unread message

Anash P. Oommen (AdWords API Team)

unread,
Mar 19, 2013, 4:13:20 AM3/19/13
to adwor...@googlegroups.com
Hi,

AdWords doesn't allow you to update text ad fields once you have created it. You need to create a copy of the text ad with modified field values and delete the existing ad instead.

Cheers,
Anash P. Oommen,
AdWords API Advisor.

On Friday, March 15, 2013 11:32:26 PM UTC+5:30, Ivan Panteleev wrote:
Hi
For example, I wanna update some of TextAd parameters. 
I'm trying to do this with this code:

function UpdateAd(AdWordsUser $user, $adGroupId, $adId) {
    $adGroupAdService = $user->GetService('AdGroupAdService', ADWORDS_VERSION);

    $ad = new TextAd();
    $ad->id = $adId;
    $ad->headline = 'Test Headline Text';
    $ad->description1  = 'Updates description1 text';

    // Create ad group ad.
    $adGroupAd = new AdGroupAd();
    $adGroupAd->adGroupId = $adGroupId;
    $adGroupAd->ad = $ad;

    // Update the status.
    $adGroupAd->status = 'ENABLED';

    // Create operation.
    $operation = new AdGroupAdOperation();
    $operation->operand = $adGroupAd;
    $operation->operator = 'SET';

    $operations = array($operation);

    // Make the mutate request.
    return $adGroupAdService->mutate($operations);
}

But after executing this function I see that headline description1 params didn't changed. Only status affected. 
Why so? Where I'm wrong?

P.S. Should I always update status field? For example what if I wanna update only some TextAd params?

Dominic Asche

unread,
Feb 9, 2015, 6:14:46 AM2/9/15
to adwor...@googlegroups.com
@Anash - does this mean, there is no way to update for example the target url of an text ad?

Danial Klimkin

unread,
Feb 9, 2015, 7:24:59 AM2/9/15
to adwor...@googlegroups.com
Hello Dominic,


No, this is not possible with AdWords.


-Danial, AdWords APi Team.

Dominic Asche

unread,
Feb 9, 2015, 9:09:35 AM2/9/15
to adwor...@googlegroups.com
Hi Danial - 
Thanks for your answer....however i'm still struggeling with your answer, because of those two circumstances:

Br,
Dominic

Danial Klimkin

unread,
Feb 9, 2015, 9:17:51 AM2/9/15
to adwor...@googlegroups.com
Hello Dominic,


1. Correct. The way it is implemented (and the same way AdWords UI does it) is to create a new ad with the new URL and delete the old one. You will still be able to obtain historical stats for both.

2. Right, this is for cases where you use click trackers or URL parameters but keep the general "template" of your URL. If you are looking to upgrade your existing ads to upgraded URLs, please stay tuned, we are currently preparing a migration guide.


-Danial, AdWords API Team.

Dominic Asche

unread,
Feb 9, 2015, 9:31:39 AM2/9/15
to adwor...@googlegroups.com
Thanks for your quick reply - I hope I don't bother you, but I need to be 100% sure, as this is super important for me and the approach how we'll use the API in the future:

  • Changing a target or display URL in the frontend of adwords performes actually a duplicat with new URLs and deletes the "old" ad?
  • When I activate my external bid-managment-tool, they put a redirection URL into the field "target URL" of my ads....so how do they do that? That's the point I do not understand

What I want to achieve is to change the display and target URL of the ads of my customers...without deleting and duplicating, as this might not be suitable for them from a tracking perspective.



Br,
Dominic

Danial Klimkin

unread,
Feb 9, 2015, 9:34:15 AM2/9/15
to adwor...@googlegroups.com
Hello Dominic,


1. This is correct. The UI gives you a notice about this.

2. I expect they re-create the ad as well. They can be keeping the list of such ads on their side and present them to you as a single ad (just a guess).

Bottom line, there is no way in AdWords to change Ad destination URL arbitrarily without re-creating the ad.


-Danial, AdWords API Team.
Reply all
Reply to author
Forward
0 new messages