AdWords
1.6K members online now
1.6K members online now
Dive into advanced features like Remarketing, Flexible Bid Strategies, AdWords Editor, and AdWords Scripts
Guide Me
star_border
Reply

Data import strategies for multiple campaigns with 100's of adgroups

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

Hi,

Currently my AdWords data flow involves:

  1. In-house product database management system written in Java SE running on a local PC. It reads and writes AdWords CSV files, among other things.
  2. AdWords Editor running locally on a PC, which locally imports/exports CSV to our DBMS and of course is our interface to Google's AdWords servers.
  3. Google online Campaign Management.

I'm looking for an alternative to the CSV file format.

 

I've unsuccessfully experimented with uncompressing .aea files, extracting the xml, then recompressing and importing them. The xml files I've obtained contain a few non-character bytes which must be intact for the file to be successfully re-imported. Apparently they are related to the content because if I change a single piece of text in the file (e.g., Active to Paused) then the re-import is rejected.

 

If someone has a similar development environment with a better solution I'd love to hear about it.

Thank you in advance!

 

 

 

1 Expert replyverified_user
1 ACCEPTED SOLUTION

Accepted Solutions
Marked as Best Answer.
Solution
Accepted by topic author Hermitian
September 2015

Re: Data import strategies for multiple campaigns with 100's of adgroups

Google Employee
# 4
Google Employee

Hermitian wrote:

My needs are "bulk" in nature. I would either download the entire account into a single XML file, or conversly upload the entire account via a single XML file. Perhaps someone already has written this code in Java for the AdWords API ?  


You can't just upload the complete account (unless you are populating a blank new account, or a new campaign, from scratch). You have to upload changes to the current state of the account (known in the API as "mutate operations"). A large part of work Editor does is figuring out deltas between the data in the account now and the data the user wants there, and formulating mutates based on these deltas.

 

And no, I'm not aware of any ready-made library of the nature you describe. The API comes with a Java client library, of course, but that just helps you generate requests and process responses - it doesn't help you figure out which requests to send. In other words, there's just low-level plumbing, but no business logic; the developer is expected to provide the latter.

View solution in original post

Re: Data import strategies for multiple campaigns with 100's of adgroups

Google Employee
# 2
Google Employee

Hermitian wrote:

I've unsuccessfully experimented with uncompressing .aea files, extracting the xml, then recompressing and importing them. The xml files I've obtained contain a few non-character bytes which must be intact for the file to be successfully re-imported.


I'd like to learn more about this. Could you show an example? AEA file is just a ZIP file containing an XML file and possibly some image files (as you have already discovered, it seems). The XML file should contain well-formed XML. If there are any invalid characters, they are likely there because they are actually present in your account data.

 

Now, we don't officially publish the schema of this XML file; it may change from version to version without notice. We don't endorse generating AEA files programmatically by tools other than Editor; on the other hand, we can't really stop you from doing that if you are so inclined, and if done correctly, it should work. Note though that Editor was tested only on files generated by another copy of Editor, not on arbitrary files generated by third-party tools. Excercise caution.

 


Apparently they are related to the content because if I change a single piece of text in the file (e.g., Active to Paused) then the re-import is rejected.


 This is surprising. I'd be looking carefully at the tool you use to unpack and create ZIP files - it sounds like the tool might be generating incorrect checksums. Again, AEA files are plain vanilla ZIP files; I'm routinely unpacking and repacking them using WinZip, 7-zip and Windows Explorer's built-in ZIP Folders support. Checksums are  built into ZIP file format, we aren't adding anything proprietary.

 

Hint: Editor can import an XML file directly. Just choose "All Files" in the File Type drop-down, and select the XML file. If it refers to any image files, they must be present at the appropriate relative paths.


If someone has a similar development environment with a better solution I'd love to hear about it. 


Sophisticated developes, such as yourself, might want to consider using AdWords API directly. This would allow you to implement tight and completely automatic integration with your business processes.

Re: Data import strategies for multiple campaigns with 100's of adgroups

Visitor ✭ ✭ ✭
# 3
Visitor ✭ ✭ ✭

Igor,

Thank you for the quick, thorough response.

 

The trouble with the non-character bytes is occuring with a Netbeans module. I see now that manual uncompress works just fine.

 

Since the aea xml is unsupported then I'd rather not go in that direction. Of course, I should chide the AdWords team for having two xml schemas -- one for aea and one for the API.

 

The AdWords Editor is a nice validation tool. Adding the ability to read/write the supported xml would be a bonus. However, I know that Google has to draw the line somewhere and charge for volume transactions that tax the servers.

 

My needs are "bulk" in nature. I would either download the entire account into a single XML file, or conversly upload the entire account via a single XML file. Perhaps someone already has written this code in Java for the AdWords API ?

 

 

Marked as Best Answer.
Solution
Accepted by topic author Hermitian
September 2015

Re: Data import strategies for multiple campaigns with 100's of adgroups

Google Employee
# 4
Google Employee

Hermitian wrote:

My needs are "bulk" in nature. I would either download the entire account into a single XML file, or conversly upload the entire account via a single XML file. Perhaps someone already has written this code in Java for the AdWords API ?  


You can't just upload the complete account (unless you are populating a blank new account, or a new campaign, from scratch). You have to upload changes to the current state of the account (known in the API as "mutate operations"). A large part of work Editor does is figuring out deltas between the data in the account now and the data the user wants there, and formulating mutates based on these deltas.

 

And no, I'm not aware of any ready-made library of the nature you describe. The API comes with a Java client library, of course, but that just helps you generate requests and process responses - it doesn't help you figure out which requests to send. In other words, there's just low-level plumbing, but no business logic; the developer is expected to provide the latter.

Re: Data import strategies for multiple campaigns with 100's of adgroups

Visitor ✭ ✭ ✭
# 5
Visitor ✭ ✭ ✭
Igor, that is a very interesting and helpful insight to the function of AdWords Editor.
Thanks!

Re: Data import strategies for multiple campaigns with 100's of adgrou

[ Edited ]
Visitor ✭ ✭ ✭
# 6
Visitor ✭ ✭ ✭

Igor, first I want to thank you for providing great insight into the Adwords Editor. It's rare to get simple, straight-forward answers for going down unsupported paths.

 

However, I have to say that I've been attempting to work with the Adwords API for quite a while now. My experience usually follows this path:

 

1. Go read up on what's _currently_ required, how-to, etc.

2. Go complete requirements

3. Get client library and start trying to code

4. Hit a roadblock because I have to wait for some approval process

5. Give up and look into using Adwords Editor

6. Fast-foward till the next time I want to "bulk" edit

7. GOTO #1

 

I've gone through this process almost as many times as y'all've changed the elements of #1 above. I'm always amazed at both the complexity of the hoops and consequently the things that can go wrong. For example, one time I did everything right, waited for all the approvals, but by the time I could finally use the Adwords API, I had solved my problem. Fast forward to the next time I needed to use the API and after much debugging I found out my dev token had been rejected (maybe because the card I used for billing had expired by now).

 

I realize that y'all are inundated with people that want to abuse your API. However, all I freaking want to do is have a way to bring our Adwords data into in-house data so I can programmatically measure, compare, and potentially adjust our campaigns. I'd settle for just programmatic access to the data.

 

I guess I'll just have to persevere and stick with it all the way through this time (before everything changes, oh wait, here comes enhanced campaigns, sigh).

 

My point is, y'all make it _VERY_ hard for your real customers to work with their own data how they want to. I'm not even going to go into the issue of _charging me_ to access my data via the API... We already spend several thousand dollars per month on Adwords but we have to spend more money to access that data via the API... Well, I guess I did kinda go into it. 

 

EDIT: I meant to add that I just happen to be going through the "read up and comply" part and I found out yesterday the Sandbox is deprecated so now I'm waiting for my test account to be approved and when I try to access our real account I'm getting <ApiError.Type>QuotaCheckError</ApiError.Type><reason>INCOMPLETE_SIGNUP</reason> and I have no idea what part of the 50 things I need to do isn't done right...

 

EDIT2: Can you provide a schema for the AEA XML file?

Re: Data import strategies for multiple campaigns with 100's of adgrou

Google Employee
# 7
Google Employee

Brett B wrote:

However, I have to say that I've been attempting to work with the Adwords API for quite a while now.


Well, I can't help you with that, but perhaps participants of AdWords API forums would, or maybe you could take advantage of AdWords API Office Hours.


6. Fast-foward till the next time I want to "bulk" edit


There are several options now for bulk editing that didn't exist when this thread started. You may want to look at AdWords scripts - not as powerful as the full API, but much lower barrier to entry. Then there is bulk editing in the online interface, and bulk keyword uploads.


I'm not even going to go into the issue of _charging me_ to access my data via the API...


Not anymore, I'm happy to report.


EDIT: I meant to add that I just happen to be going through the "read up and comply" part


If you refer to Required Minimum Functionality, then note that it doesn't apply to so-called End-Advertiser-Only AdWords API Clients (as defined by Terms and Conditions), which basically means API clients developed in-house by a single advertiser for his or her own use (as opposed to, say, a reseller or a managing agency). If you implement an API client to work solely on your own accounts, then you wouldn't have to implement any features that you don't plan to use.


EDIT2: Can you provide a schema for the AEA XML file?


I cannot, I'm sorry to say. We don't plan to officially publish it. It may and often does change without notice, as Editor implements new features, or old features get removed. Publishing the schema would create a support burden that we would rather not take on.

 

Of course, I can't stop you from reverse-engineering the schema if you are so inclined.

Re: Data import strategies for multiple campaigns with 100's of adgrou

Visitor ✭ ✭ ✭
# 8
Visitor ✭ ✭ ✭

Thanks for the great answers. I found the AdWords Script option right after making my post and I've been working with it quite a bit since then. Maybe it will hold me over till my re-app for my dev token gets approved (and then my test account gets approved).

 

I understand about the schema. Just hoping to save myself the reverse engineer time.