Few weeks ago i asked how to exclude a placement.
Now I want to exclude a Mobile App.
(The questions are at the end of the post)
in the UI, I see all sorts of placements: urls, mobile apps (and maybe others?)
A mobile app often looks like "mobile::2-com.berry,tsakala".
If I try to exclude by placementUrl: placement='mobile::2-com.berry,tsakala' I receive an error from google API:
[CriterionError.INVALID_FORMAT_FOR_PLACEMENT_URL @ operations[0].operand.criterion.url; trigger:'mobileapp::2-ix.com.android.virtualwalkietalkie']
So I tried to follow the documentation:
There's "xsi_type = 'MobileApplication'" But
Questions:
- Is there ANOTHER way of excluding a specific mobile app via API?
- is there a way to try the Beta API ?
- Am I doing something wrong ? :)
The Adwords API version I'm using is v201306 (same as mentioned in the mobileApplication docs)
I'm using Python, if it matters.
This is my current code:
placement_url = "mobileapp::2-com.berry,tsakala"
placement_url = placement_url.replace('mobileapp::', "")
operations = [ {
'operator': 'ADD',
'operand': {
'type': 'NegativeCampaignCriterion',
'campaignId': campaign_id,
'criterion': {
'xsi_type': 'MobileApplication',
'appId': placement_url,
},
}
} ]