adding mobile image ad to a campaign; several questions

45 views
Skip to first unread message

Berry Tsakala

unread,
Oct 19, 2014, 3:08:40 PM10/19/14
to adwor...@googlegroups.com
I found on the web only a single example of using MobileImageAd (duplicated in several places).
The latest version of this example on the web seems to be from 2011  (e.g. https://searchcode.com/codesearch/view/2598566/)

i'm trying to adapt it to version='v201402'   (yes, i know it's deprecated since last week, I assume the problems are the same)


Here's my current code:

image = {
 
'dimensions': [{
   
'key': 'FULL',
   
'value': {'width': width, 'height': height }
 
}],
 
'name': 'sample.jpg',
 
'data': base64.encodestring( Utils.ReadFile(image_file) )
}
operations
= [{
 
'operator': 'ADD',
 
'operand': {
   
'xsi_type': 'AdGroupAd',
   
'adGroupId': adgroup_id,
   
'ad': {
     
'xsi_type': 'MobileImageAd',
     
'markupLanguages': ['HTML'],                          # why do I need it anyway?
     
'mobileCarriers': ['T-Mobile@US', 'Verizon@US'],
     
'image': image,
     
'url': destination_url,
     
'displayUrl': display_url
   
}
 
}
}]





first problem:
"ImageError.FILE_TOO_LARGE"    -- why? it's only 8k  (attached). 


2nd problem: carriers:
AdError.INVALID_MOBILE_CARRIER_TARGET @ operations[0].operand.ad.mobileCarriers
According to the docs, they should be accepted.  This was also the syntax for the 2011 api-version.  Why not?
For now I ended up using "ALLCARRIERS".  But I'd like to target carriers, too

3rd problem:
AdError.INVALID_AD_ADDRESS_CAMPAIGN_TARGET
(according to the docs it has nothing to do with "url" and "display_url", which i won't disclose here, but are perfectly valid URLs in my case) 
I do not understand this error
"INVALID_AD_ADDRESS_CAMPAIGN_TARGET    User cannot create mobile ad for countries targeted in specified campaign."

thank you

sample.jpg

Berry Tsakala

unread,
Oct 20, 2014, 6:00:17 AM10/20/14
to adwor...@googlegroups.com
2nd and 3rd problems occured because the campaign was targeted to a different country.

i'm now left only with the size problem:
the file is 8kb but reported as "FILE_TOO_LARGE

Danial Klimkin

unread,
Oct 20, 2014, 9:16:41 AM10/20/14
to adwor...@googlegroups.com
Hello Berry,


Please send us the full XML response with the error over email ("Reply to author" button).


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