For the complete documentation index, see llms.txt. This page is also available as Markdown.

Use contextual targeting in segments

Use the semantic information extracted from your content as a criterion in an audience segment.

Your goal

Build an audience from the content people consumed, using the entities, IAB categories, or targeting lists the semantic engine attached to their events.

Expected outcome

A saved audience segment whose criteria include contextual information, with the frequency and recency constraints you need.

When this is useful

Contextual targeting normally addresses pages. This job addresses people, on the basis of the pages they read - "users who read at least three articles about a given topic in the last 30 days". It is the bridge between the contextual module and the rest of your audience work.

Prerequisites

The prerequisites differ depending on which contextual criterion you want to use.

To use as criteria
What must be in place

Entities and IAB categories

The schema has been updated, and the Tag event with semantic extract option is activated in the Contextual Targeting Extractor event rule.

A particular targeting list

The schema is updated, and the Use for Audience segments option is activated on that targeting list.

For Edge segmentation you do not need the event rule step - but you do need @EdgeAvailability on semantic_tagging and targeting_list_ids.

Add targeting lists to a segment

The example below builds a server-side segment on targeting lists using the Advanced Segment Builder. Any builder can be used, though the Standard Segment Builder requires extra configuration - the criteria have to be wrapped in audience features first.

1

Open the builder

Go to Builders > Advanced.

2

Add the targeting list criterion

From the schema on the right-hand side, open the events object and drag the targeting_list_ids attribute onto the + icon.

3

Select the lists

Click the targeting_list_ids card and select Edit. Choose the Equals operator, then search for and select the targeting lists you want in Field Values, and click Submit.

4

Add frequency, if you need it

Click the events card and select Edit. Check I want to add a frequency and enter the frequency you want.

5

Add recency, if you need it

Still in the events card, click Add a Field Condition and fill in:

  1. Field name: ts

  2. Operator: After

  3. Field Values: click Relative and enter the period you want to query over

6

Finish the segment

Add any other criteria your audience needs, then click Save as segment and give it a name.

Verification

The segment saves and its user count is plausible. It is a Query segment like any other, so keep it persisted, as it is by default, if you intend to activate it.

Troubleshooting

My targeting list does not appear in the search input

Check that Use for Audience segments is activated on the targeting list. If it is, wait around 15 minutes for the targeting lists to be refreshed.

My events are not tagged with entities and IAB categories

Check that Tag event with semantic extract is activated in the Contextual Targeting Extractor event rule.

When exactly are events tagged?

Every nature of event - page_view, basket_view, article_view, and so on - is tagged with the extracted entities and IAB categories, and with the corresponding targeting list IDs, on entry into the platform. These consequences follow:

  • Events ingested before the event rule was configured with Tag event with semantic extract carry no entities or IAB categories, and are not targetable through those criteria.

  • Events ingested before a targeting list was configured with Use for Audience segments carry no targeting list ID for it, and are not targetable through that criterion.

  • Updating a targeting list's definition has no effect on events already ingested - their targeting list IDs are not updated.

Practical consequence: enable both options as early as possible, and expect a segment built on a brand-new criterion to grow from the day it was enabled rather than to arrive fully populated.

Last updated

Was this helpful?