how create full add with stats ?

55 views
Skip to first unread message

Minius

unread,
Jun 30, 2011, 7:12:53 AM6/30/11
to AdWords API Forum
Hello,

I want some help on how create/add with stats? In code i use adStats()
funcion, but i can`t do it successfuly, i got error somthig like:
Unmarshalling Error: cvc-elt.4.3: Type 'ns1:AdStats' is not validly
derived from the type definition, 'Ad', of element 'ns1:ad'.

And what is the best practice for updating existing add (for example i
want change only description1 and description2) ? I know, that it`s
imposibble modify direcly.

Anash P. Oommen

unread,
Jul 5, 2011, 4:42:21 AM7/5/11
to adwor...@googlegroups.com
Hi Minius,

You can refer to http://code.google.com/p/google-api-adwords-php/source/browse/trunk/examples/v201101/AddAds.php for details on how to create an Ad. As for the part on AdStats, I don't quite understand what you are trying to do. If you want to retrieve your ad stats, you can try retrieving the ads you create normally, while requesting the appropriate selector field names for stats fields. See http://code.google.com/apis/adwords/docs/reference/latest/AdGroupAdService.AdStats.html and http://code.google.com/p/google-api-adwords-php/source/browse/trunk/examples/v201101/GetAllAds.php for details.

Also, Ads are immutable, so the right way to modify an ad would be to delete an existing ad and create a copy with modified data.

Cheers,
Anash P. Oommen,
AdWords API Advisor.

Minius

unread,
Jul 11, 2011, 7:48:56 AM7/11/11
to AdWords API Forum
Hi,

> Also, Ads are immutable, so the right way to modify an ad would be to delete
> an existing ad and create a copy with modified data.

As of this, is there are current function (adwords api function) to
copy ad and from copied ad create new ad with modified, for example,
headline description1 and description2 ? Or there are only one way -
bay creating my own functions?

And i have another question.
When i delete ad (than later create new based on deleted ad), deleted
ad still visible with "delete" status. Is there are some possibilities
to completely remove ad from adword system?




On 5 Lie, 11:42, "Anash P. Oommen" <anash.p.oom...@google.com> wrote:
> Hi Minius,
>
> You can refer tohttp://code.google.com/p/google-api-adwords-php/source/browse/trunk/e...for
> details on how to create an Ad. As for the part on AdStats, I don't quite
> understand what you are trying to do. If you want to retrieve your ad stats,
> you can try retrieving the ads you create normally, while requesting the
> appropriate selector field names for stats fields. Seehttp://code.google.com/apis/adwords/docs/reference/latest/AdGroupAdSe...
>  andhttp://code.google.com/p/google-api-adwords-php/source/browse/trunk/e...for

David Torres

unread,
Jul 13, 2011, 1:13:54 PM7/13/11
to adwor...@googlegroups.com
Hi,

1) There is no specific operation to copy an Ad in the API, but this could be easily implemented by fetching the Ad (via get call) then modify the Ad as required, remove its id (so it gets created as a new Ad) and send a mutate call.

2) Ads don't ever get deleted of the system just marked as "Deleted"


Best,

-David Torres - AdWords API Team

Minius

unread,
Jul 21, 2011, 9:53:18 AM7/21/11
to AdWords API Forum
Ok, thanks

And is there some solution on how to create backup for some adwords
account throw web interface?
That, if with automatic ad updating process throw api, appears some
mistake will be possibility full restore in preview state. Because now
i see only partial backup, for changes

Eric Koleda

unread,
Jul 26, 2011, 11:17:41 AM7/26/11
to adwor...@googlegroups.com
Hi Minius,

I am not aware of any backup mechanisms built into the API or the UI.

Best,
- Eric
Reply all
Reply to author
Forward
0 new messages