Partager via


targetingCriteria Object

LinkedIn uses member facets to define a segment of members who will be either included or excluded from an advertising campaign's targeting.

targetingCriteria provides a generic AND / OR construct to include and exclude different targeting facets when defining the audience for an Ad campaign. targetingCriteria is attached to a campaign and is replacing the now deprecated targeting object.

Note

If you use targetingCriteria field to specify targeting criteria for a campaign, you cannot use the targeting field. Furthermore, if an existing campaign is ever updated using targetingCriteria , you must use targetingCriteria going forward, since this field permits more expressive criteria.

Structure

The basic structure for a targetingCriteria object is as follows:

{
    "targetingCriteria":{
        "include":{
            "and":[
                {
                    "or":{
                        "urn:li:adTargetingFacet:{facet1}":[
                            "{facet1_value1}",
                            "{facet1_value2}"
                        ],
                        "urn:li:adTargetingFacet:{facet2}":[
                            "{facet2_value1}",
                            "{facet2_value2}"
                        ]
                    }
                },
                {
                    "or":{
                        "urn:li:adTargetingFacet:{facet3}":[
                            "{facet3_value1}",
                            "{facet3_value2}"
                        ],
                        "urn:li:adTargetingFacet:{facet4}":[
                            "{facet4_value1}"
                            "{facet4_value2}"
                        ]
                    }
                }
            ]
        },
        "exclude":{
            "or":{
                "urn:li:adTargetingFacet:{facet5}":[
                    "{facet5_value1}"
                    "{facet5_value2}"
                ],
                "urn:li:adTargetingFacet:{facet6}":[
                    "{facet6_value1}"
                    "{facet6_value2}"
                ]
            }
        }
    }
}

Rules

  • The include object contains a single encompassing array object called “and” .
  • The exclude object contains a single "or" object. It does not support the same "and" array object in the include object.
  • Each element within this “and” , contains at least 1 or many “or” objects.
  • Each “or” object can contain a collection of adTargetingFacets .
  • Each adTargetingFacet supports a list of pre-defined, standardized values.
  • Within a single adTargetingFacet , all values in the list are OR’d.
  • The exclude  values in the list are OR’d.

Order of evaluation

  • The include object is evaluated before the exclude object.
  • The include object cannot be empty and is evaluated first.
  • The exclude object can be empty. (in which case no further processing is required)
  • The set of members specified by the exclude object is filtered from the set of members specified by the include list.
  • The resulting set of members will be used for targeting. (provided the number of members is greater than **300).

Convert your desired audience to Targeting Criteria

  • To create a targeting criteria describing your desired audience, please follow the guide for /adTargetingFacets and /adTargetingEntities to find the most fitting adTargetingFacets and values within the adTargetingFacet.

How to display Targeting Criteria

  • To display a targeting criteria in a human readable format, adTargetingFacet urns and adTargetingEntity urns must be converted to localized names. To do so please use the urn-to-name resolver API.