User Segments
The platform provides a mechanism that enables targeting advertising campaigns to user segments. Segments can be imported into the platform from external sources or generated within the platform based on specific rules.
In order for the platform to work with segments provided by third-party suppliers or by the application using the platform, the following steps are required:
- Import the segments
- Configure user matching (cookie matching)
Segment Import
Segments can be imported into the platform using CSV file(s). File requirements:
- No headers
- Must contain two columns:
user_id
,segments
- The value in the segments column must be enclosed in double quotes, with segments separated by commas
- Each CSV file represents a snapshot of users and their segments at the time the file is generated. If the same user appears in multiple files with different sets of segments, only the segments from the latest CSV file will be taken into account.
Example CSV file:
uid_1,"segment1, segment2"
uid_2,"segment3"
uid_3,"segment1"
WARNING
user_id (also known as uid) is the user identifier from the platform consumer’s system, which is also used in ad and tracking requests. (See section)
User Matching
User matching is built into the Tracker SDK. If the Tracker SDK is integrated into a web or mobile application and the user_id is correctly set, then no additional matching configuration is required.
However, if you need to configure user matching (e.g., when using third-party segment sources), the application code must include a call to the tracker with the required parameters. The tracker is a request to a special endpoint:
GET "https://TRACKER_HOST/matchspm?pi=PARTNER_ID&pui=USER_ID"
TRACKER_HOST
– the tracker host (provided during platform integration)PARTNER_ID
– the partner (consumer) ID (provided during platform integration)USER_ID
– the user ID in the platform consumer’s system
This request should be sent when the application starts—if user_id is already known—and/or after calling the setUserId
function from the SDK.
WARNING
Note that the USER_ID
used in the matching request must match the user_id
in the CSV file.