Skip to main content
Segments

Segments are the building blocks to collect user data for retargeting and lookalikes

M
Written by Marcus Johansson
Updated over a week ago

Segments are group containers of users, for e.g. retargeting (sometimes called remarketing) purposes. The most common use and purpose of retargeting is to stay top of mind of consumers and drive action and conversion.

Create and manage segments in Supply / Segments. Use the tag icon on each row to manage invocation scripts.

Segment Path

A segment can optionally be given a path, to indicate that it will collect users only visiting a certain subpage of a domain. If no path is set, all paths are accepted. Paths are given with an opening forward slash. E.g.

/carbrands/audi/

to collect data onto the segment for all pages starting with the URL

Paths can also be given as a regular expression, conforming to the following format and rules:

  • starts with '^'

  • ends with '$'

  • must be written to match the full path of the site including optional or mandatory query parameters.

  • match will be done from the first slash following the domain

Contained Segments

Segments can hold other segments. When a segment is triggered, its contained segments are iterated as well, and users are placed there.

Working with segment paths and contained segments makes it possible to collect users into several specifc segments from only one segment invocation. Just attached segments with path defined as contained to the segment whose invocation script is placed on the website.

Affinity

With segment affinity reporting, sites are presented that has a relatively high ratio of users belonging to the given segment. This information can be useful when understanding a segment and where its users are found on the Internet.

JSONP

It's also possible to have the segment endpoint respond with a JSONP payload communicating back the Bidtheatre user ID. Just specify the callback method and optionally also the JSON variable name. If no variable name is supplied it will default to "kuid".

<!-- Bidtheatre default segment invocation with JSONPP callback details -->
<script type="text/javascript" src="https://adsby.bidtheatre.com/js/asx_track.min.js"></script>
<script>
asxtrack.config = {
segmentId: 4471,
callback: "btCallback",
callbackVariable: "btId"
};

asxtrack.callSegment();
</script>

To have the above work the callback must also be implemented on the calling page

<script>
function btCallback(obj) {
// {"btId":"2ff872e6-8756-4c49-9d90-807fcae319bf"})
if(obj) {
let btId = obj.btId;
}
}
</script>


โ€‹

Did this answer your question?