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?
>
--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
http://adwordsapi.blogspot.com
http://groups.google.com/group/adwords-api
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
You received this message because you are subscribed to the Google
Groups "AdWords API Forum" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
---
You received this message because you are subscribed to the Google Groups
"AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.