Create DEVICE criterion on Campaign

91 views
Skip to first unread message

Pietro Galassi

unread,
Jan 22, 2020, 6:58:27 AM1/22/20
to AdWords API and Google Ads API Forum
How to add a DEVICE criterion to a CAMPAIGN with apis ?


Performing this request:
{
    "operations": {
        "create": {
            "status": "ENABLED",
            "campaign": "customers/YYYYYYYYYYYYYYY/campaigns/XXXXXXXXXXXXXX",
            "type": "DEVICE",
            "device": {
                "type":"CONNECTED_TV"
            }
        }
    }
}

gives:

{
    "error": {
        "code": 400,
        "message": "Request contains an invalid argument.",
        "status": "INVALID_ARGUMENT",
        "details": [
            {
                "errors": [
                    {
                        "errorCode": {
                            "campaignCriterionError": "OPERATOR_NOT_SUPPORTED_FOR_CRITERION_TYPE"
                        },
                        "message": "This operator cannot be applied to a criterion of this type.",
                        "trigger": {
                            "stringValue": ""
                        },
                        "location": {
                            "fieldPathElements": [
                                {
                                    "fieldName": "operations",
                                    "index": "0"
                                },
                                {
                                    "fieldName": "create"
                                },
                                {
                                    "fieldName": "device"
                                }
                            ]
                        }
                    }
                ]
            }
        ]
    }
}


Google Ads API Forum Advisor Prod

unread,
Jan 22, 2020, 12:07:12 PM1/22/20
to pietro....@gmail.com, adwor...@googlegroups.com
Hi Pietro,

Thank you for reaching out. The device criteria for each device implicitly exists in each campaign, so you won't be able to ADD or REMOVE those criteria. However, you can use bid modifiers to opt out of a specific device or set the bid modifier for a specific device by updating the bid_modifier of the CampaignCriterion.

Additionally, make sure you are performing this call on a Display campaign since this is the only campaign type that supports CONNECTED_TV (other than Video campaigns which can't be modified using the API).

If you are still having issues, please share the uncensored logs via Reply privately to author so that I can further investigate the issue.

Regards,
Mitchell
Google Ads API Team

ref:_00D1U1174p._5001USwu76:ref
Reply all
Reply to author
Forward
0 new messages