How to target only Android OperatingSystemVersion python

70 views
Skip to first unread message

wes...@system1.com

unread,
Aug 23, 2018, 5:08:44 AM8/23/18
to AdWords API and Google Ads API Forum
Hello,

How can I exclude all versions of iOS in my campaign without explicitly removing every criterionID for an iOS version. My operation looks something like this:

        {
                'xsi_type': 'CampaignCriterionOperation',
                'operator': 'REMOVE',
                'operand': {
                    'xsi_type': 'CampaignCriterion',
                    'campaignId': campaign_id,
                    'criterion': {
                        'xsi_type': 'OperatingSystemVersion',
                        'id': 630161,
                        'name': 'iOS',
                        'osMajorVersion': 2,
                        'osMinorVersion': 0,
                        'operatorType': 'GREATER_THAN_EQUAL_TO'
                    }
                }
            }

but I can't the following error:

    NewEntityCreationError.TEMP_IDS_NOT_ALLOWED

Thanks,

Bharani Cherukuri (AdWords API Team)

unread,
Aug 23, 2018, 3:50:46 PM8/23/18
to AdWords API and Google Ads API Forum
Hello Wesley, 

You will be able to only target the OperatingSystemVersion using the CampaignCriterionService by selecting the Criteria as OperatingSystemVersion. It is currently not possible to exclude this criteria through the API. Also, please note that this is only targetable for Display campaigns. Targeting for other campaigns or excluding this might result in an error. You may refer to the operating system versions from here and also take a look at the Criteria Usage table as a reference. To remove the OperatingSystemVersion campaign criteria, please find the SOAP request below:

<mutate xmlns="https://adwords.google.com/api/adwords/cm/v201806"> 
<operations> 
<operator>REMOVE</operator> 
<operand> 
<campaignId>xxxxxxxx</campaignId> 
<criterion xmlns:ns2="https://adwords.google.com/api/adwords/cm/v201806" xsi:type="ns2:OperatingSystemVersion"> 
<ns2:id>630161</ns2:id> 
</criterion> 
</operand> 
</operations>

If you continue to have an issue with this, could you please share the complete API SOAP logs, so I can take a look. 

Regards,
Bharani, AdWords API Team

wes...@system1.com

unread,
Aug 23, 2018, 6:15:11 PM8/23/18
to AdWords API and Google Ads API Forum
Hi Bharani,

Thank you for your response. You mentioned that it is currently not possible to exclude the criteria through the API but you also posted an example to remove the criteria. Is excluding and removing not the same thing? Could I just remove OperaringSystemVersion criteria for all versions of iOS?

Thanks,

wes...@system1.com

unread,
Aug 23, 2018, 7:09:19 PM8/23/18
to AdWords API and Google Ads API Forum
Also looking at the ConstantDataService (https://developers.google.com/adwords/api/docs/appendix/codes-formats#mobile-platforms), I can't seem to find criterion ids for BlackBerry or WebOS but I still see them in the adwords UI. Are these options still configurable?

Thanks,

Bharani Cherukuri (AdWords API Team)

unread,
Aug 24, 2018, 2:04:59 PM8/24/18
to AdWords API and Google Ads API Forum
Hello Wesley, 

You will be able to EXCLUDE or REMOVE a criteria. If you want to exclude criteria, you will need to set them as negative criteria using the NegavtiveCampaignCriterion or NegativeAdGroupCriterion. This will exclude them from targeting. You will be able to remove the negative criteria if they are no longer required. In this scenario, OperatingSystemVersion does not support excluding. Hence, this criteria is only targetable and cannot be excluded. This said, you will be able to only Remove the criteria that is being targeted. For example, if a Display campaign is targeted for iOS versions 2.0 and above in the UI, you will be able to remove this criteria. You will not be able to explicitly exclude iOS devices for a campaign through the API. You may refer to the criteria usage table for more information. 

This said, the Mobile Platforms that are supported through the API are listed here. The other platforms are not supported. Let me know if you have any other questions.

Regards,
Bharani, AdWords API Team

On Thursday, August 23, 2018 at 5:08:44 AM UTC-4, wes...@system1.com wrote:
Reply all
Reply to author
Forward
0 new messages