Update Custom Audience Targeting

Update Custom Audience Targeting for the specified campaign.

📘

With Custom Audiences, you can specify both INCLUDE and EXCLUDE.

For example: include all female visitors that made a purchase - but exclude visitors above the age of 40.

📘

Combining INCLUDE and EXCLUDE conditions limits your target audience (AND Operation).

VALID request examples:

(Follow the examples from left to right...)

{
   "collection": []
}
{
    "collection": [
        {
            "collection": [
                224820,
                25287
            ],
            "type": "INCLUDE"
        }
    ]
}
{
    "collection": [
        {
            "collection": [
                224820,
                25287
            ],
            "type": "INCLUDE"
        },
        {
            "collection": [
                19884,
                29870
            ],
            "type": "EXCLUDE"
        }
    ]
}
{
    "collection": [
        {
            "collection": [
                224820,
                25287
            ],
            "type": "INCLUDE"
        },
        {
            "collection": [],
            "type": "EXCLUDE"
        }
    ]
}
{
    "collection": [
        {
            "collection": [
                224820,
                25287
            ],
            "type": "EXCLUDE"
        }
    ]
}

🚧

Audience Targeting does not support a PATCH operation - the submitted values overwrite the old ones.

📘

For a successful request, the same object is returned in the response.

📘

Recommended Flow

If you want to remove exclusions (but keep inclusions), perform the following steps:

  1. Fetch the current list of inclusions.
  2. Send a request to Target ALL (see first example, above).
  3. Send a request to target the inclusions (obtained in step 1).

INVALID request examples:

{
    "collection": [
        {
            "collection":  [],
            "type": "EXCLUDE"
        }
    ]
}
{
    "collection": [
        {
            "collection": [],
            "type": "INCLUDE"
        },
        {
            "collection": [],
            "type": "EXCLUDE"
        }
    ]
}
{
    "http_status": 400,
    "message": "Please select an audience",
    "offending_field": "retargeting_first_party_audience"
}

🚧

If the Audience Targeting Object contains a non-empty collection, then at least 1 of the Audience Targeting Restrictions Objects must also contain a non-empty collection.

Language