Skip to main content

Audience Service

Audience Service is responsible with subscribing to Segments on DataSapien Mobile Backend to make targeting users possible via Audiences.

Segments (Segment Definitions to be more specific) and Audiences are created and managed on Orchestrator.

info

Mobile SDK performs background network access to download Segment Definitions & Audiences from DataSapien Mobile Backend.

Segment Subscriptions

A Segment subscription is a simple flag that indicates a particular Mobile SDK instance is in a specific Segment Definition. Mobile SDK "subscribes to" or "unsubscribes from" a segment upon MeData collection. Audience Service is triggered upon MeData value collection and if there is a defined segmentation for the MeData Definition for which a new value was collected, Audience Service calls DataSapien Mobile Backend's subscription endpoint.

On mobile side, when MeData Service collects and updates the value for Country of residence (source of this is not relevant at this stage), Audience Service taps in to see if there is a segmentation for that value. If collected country value is "UK", Audience Service calls Mobile Backend subscription endpoint to subscribe to UK Residents.

Audiences

Audiences are logical combinations of Segment Definitions. In other words; an Audience is just a named combination of 'Segments'.

Lets reuse Country of residence and Gender based Segments from previous section to understand how powerfull Audiences can be. Using just those two we can create various Audiences:

  • UK Males Audience: By using "AND" logical operator: "UK Residents" AND "Males"
  • Turkey or UK Residents Audience: By using "OR" logical operator: "TR Residents" OR "UK Residents"
  • Females in Turkey or UK Audience: By using "AND" and "OR" logical operators: "Females" AND ("TR Residents" OR "UK Residents")

With users (Mobile SDK in their name) subscribed to their related Segments, platform is now capable of finding specific users for a given Audience by calculating combinations.

Audience Service Functions

To access AudienceService functions; get its instance from DataSapien object: DataSapien.getAudienceService().

List Of AudienceService Functions