Creating a segment with the “pixel” type

Creates a “pixel” segment with the specified parameters.

If different criteria are used when creating a segment (for example, multiple tags are set), the segment will include users who meet all the criteria simultaneously.

  1. Request syntax
  2. In the request body
  3. Response format

Request syntax

https://api-audience.yandex.ru/v1/management/segments/create_pixel
 ? 

In the request body


{
    "segment" : {
        "name" :  < string > ,
        "pixel_id" :  < integer > ,
        "period_length" :  < integer > ,
        "times_quantity_operation" :  < pixel_times_quantity_operation > ,
        "times_quantity" :  < integer > ,
        "utm_source" :  < string > ,
        "utm_content" :  < string > ,
        "utm_campaign" :  < string > ,
        "utm_term" :  < string > ,
        "utm_medium" :  < string > 
    }
}
Parameters Description
segment The segment with the specified parameters.
segment
name Segment name.
pixel_id The pixel ID.
period_length

The time period for tracking the user with the pixel.

Acceptable values (in days): from 1 to 90 (inclusive).

times_quantity_operation

Condition for including users in a pixel segment.

Possible values:

  • lt — Less than. The user was detected by the pixel fewer than M times during the period.
  • eq — Equal to. The user was detected by the pixel M times during the period.
  • gt — Greater than. The user was detected by the pixel more than M times during the period.
times_quantity

Threshold value (M). This is the base number for comparing how many times the user was detected by the pixel during the period.

utm_source The utm_source tag. Can be used as a condition for including users in a pixel segment.
utm_content The utm_content tag. Can be used as a condition for including users in a pixel segment.
utm_campaign The utm_campaign tag. Can be used as a condition for including users in a pixel segment.
utm_term The utm_term tag. Can be used as a condition for including users in a pixel segment.
utm_medium The utm_medium tag. Can be used as a condition for including users in a pixel segment.
Parameters Description
segment The segment with the specified parameters.
segment
name Segment name.
pixel_id The pixel ID.
period_length

The time period for tracking the user with the pixel.

Acceptable values (in days): from 1 to 90 (inclusive).

times_quantity_operation

Condition for including users in a pixel segment.

Possible values:

  • lt — Less than. The user was detected by the pixel fewer than M times during the period.
  • eq — Equal to. The user was detected by the pixel M times during the period.
  • gt — Greater than. The user was detected by the pixel more than M times during the period.
times_quantity

Threshold value (M). This is the base number for comparing how many times the user was detected by the pixel during the period.

utm_source The utm_source tag. Can be used as a condition for including users in a pixel segment.
utm_content The utm_content tag. Can be used as a condition for including users in a pixel segment.
utm_campaign The utm_campaign tag. Can be used as a condition for including users in a pixel segment.
utm_term The utm_term tag. Can be used as a condition for including users in a pixel segment.
utm_medium The utm_medium tag. Can be used as a condition for including users in a pixel segment.

Sample request

POST https://api-audience.yandex.ru/v1/management/segments/create_pixel?

Response format


{
    "segment" :  < _pixel_segment > 
}
Parameters Description
segment The segment with the specified parameters.
Parameters Description
segment The segment with the specified parameters.