Update: I fiddled around some more, and it turns out this has nothing to do 
with the trimming. The issue is that in CSV reports, fields that start with 
a hyphen are prepended with a space. For example: I created an ad in the 
Web UI, starting the text lines with different interpunctuation symbols but 
without whitespace in front. This is the resulting Ad Performace Report:

Ad ID,Ad type,Ad,Description line 1,Description line 2,Campaign,Ad group,Ad 
state,Campaign state,Ad group state

21734783092,Text ad, - Test this,: Also this,— And that,Test Hyphen In 
Front,Ad Group #1,enabled,paused,enabled

Total, --, --, --, --, --, --, --, --, --

The headline, which starts with a hyphen, is preceded by a space character, 
while description lines 1 and 2 start with a colon and an en-dash and are 
left alone. XML reports do not exhibit this peculiarity, by the way.

Under the assumption that a metric/attribute can never start with 
whitespace (as indicated by the automatic stripping of ad headlines / 
description lines done by the API) I guess the workaround would be to trim 
all values in CSV reports. But is this assumption correct?

Thanks and best regards,
Dorian

On Friday, June 28, 2013 11:30:41 AM UTC+2, Dorian Kind wrote:
>
> Hi all,
>
> I noticed that newly created ads containing a headline or a description 
> line starting with whitespace will be trimmed automatically, e.g. when 
> creating a TextAd like so:
>
> {'ad': {
>   'headline': '  My headline',
>   'description1': 'A description',
>   'description2': 'More description',
>   'displayUrl': 'example.com',
>   'url': 'http://www.example.com/'
>   }
> }
>
> the return value from AdGroupAdService will look like this (this is also 
> how the ad appears in the Web UI):
>
> {'ad': {
>   'Ad_Type': 'TextAd',
>   'id': '123456789',
>   'headline': 'My headline',
>   'description1': ''A description',
>   'description2': 'More description',
>   'displayUrl': 'example.com',
>   'url': 'http://www.example.com/'
>   }
> }
>
> This is no problem per se, but when downloading an 
> ad-hoc AD_PERFORMANCE_REPORT containing the specific ad, it will appear 
> with the headline as originally sent (i.e., with the whitespace in front), 
> which makes reconciliation difficult.
>
> An example of this behavior can be found if you take a look at ad 
> ID 21729807532 in ad group ID 7463768572 within the account 464-903-6457.
>
> Is this behavior intended? And if not, what are recommended practices to 
> handle this discrepancy?
>
> Many thanks and best regards,
> Dorian
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
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 adwords-api+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to