Segment builders
Last updated
Was this helpful?
Last updated
Was this helpful?
You have access to three tools to segment your audience using queries:
Leverage to build your queries in the standard segment builder (Audience > Builders > Standard). Once set up, this is the preferred solution for fast queries building and visualising the segment in a dashboard before saving it.
Drag and drop fields from your schema into a visual OTQL query builder with the advanced segment builder (Audience > Builders > Advanced). It doesn't require any setup but requires knowledge about the schema. May not be the best option for casual users.
Build OTQL queries directly in Data Studio > Query tool. This requires a solid knowledge of your schema and .
You enable this feature when you set up at least:
One segment builder
One .
You can set up multiple segment builder to create templates once you identify common segment queries that you often use.
Each segment builder has a list of default audience features that are automatically used in it.
You can create and edit segment builders through the UI by going to Settings > Datamart > Your datamart > Segment builders. You can also manage them by API.
GET
https://api.mediarithmics.com/v1/datamarts/{datamart_id}/audience_builders
datamart_id
integer
The ID of the datamart
GET
https://api.mediarithmics.com/v1/datamarts/{datamart_id}/audience_builders/{audience_builders_id}
datamart_id
integer
The ID of the datamart
audience_builders_id
integer
The ID of standard segment builder you want to get
POST
https://api.mediarithmics.com/v1/datamarts/{datamart_id}/audience_builders
datamart_id
integer
The ID of the datamart
datamart_id
string
The ID of the datamart
demographics_features_ids
array
Array of string: the IDs of audience features you want to link to your standard segment builder. These audience features will always be selected in the builder.
name
string
Name of the standard segment builder
GET
https://api.mediarithmics.com/v1/datamarts/{datamart_id}/audience_builders
datamart_id
integer
GLLBBPYmcMbn
GET
https://api.mediarithmics.com/v1/datamarts/{datamart_id}/audience_builders/{audience_builders_id}
datamart_id
integer
EACXzNpxesGA
audience_builders_id
integer
y1iztafbxNOl
POST
https://api.mediarithmics.com/v1/datamarts/{datamart_id}/audience_builders
datamart_id
integer
UpWZubSJk7SC
datamart_id
string
ZdvK39oPj25k
demographics_features_ids
array
Zu89g8D3qu6m
name
string
bpFIx0HWRbci
You cannot create more than 20 standard segment builder instances per datamart.
PUT
https://api.mediarithmics.com/v1/datamarts/{datamart_id}/audience_builders/{audience_builders_id}
audience_builders_id
integer
The ID of the standard segment builder to edit
datamart_id
integer
The ID of the datamart
datamart_id
string
The ID of the datamart
demographics_features_ids
string
Array of string: The IDs of audience features you want to link to your standard segment builder. These audience features will always be selected in the builder.
name
string
The name of the standard segment builder
PUT
https://api.mediarithmics.com/v1/datamarts/{datamart_id}/audience_builders/{audience_builders_id}
audience_builders_id
integer
aIhsvJpgK6ny
datamart_id
integer
TTSN6yxr96WI
datamart_id
string
N2N4Y3WHqATi
demographics_features_ids
string
1EsZV25xtbUt
name
string
xsAiWSvKY437
This API helps you upload dashboards.
GET
https://api.mediarithmics.com/v1/data_file/data?uri=mics://data_file/tenants/{organisation_id}/dashboards/{datamart_id}/AUDIENCE_BUILDER-{audience_builder_id}.json
organisation_id
integer
The ID of the organisation
datamart_id
integer
The ID of the datamart
audience_builder_id
integer
The ID of the standard segment builder on which you want to upload dashboards
PUT
https://api.mediarithmics.com/v1/data_file/data?uri=mics://data_file/tenants/{organisation_id}/dashboards/{datamart_id}/AUDIENCE_BUILDER-{audience_builder_id}.json
organisation_id
integer
The ID of the organization
datamart_id
integer
The ID of the datamart
audience_builder_id
integer
The ID of the standard segment builder on which you want to upload dashboards
GET
https://api.mediarithmics.com/v1/data_file/data?uri=mics://data_file/tenants/{organisation_id}/dashboards/{datamart_id}/AUDIENCE_BUILDER-{audience_builder_id}.json
organisation_id
integer
xpvJF5g4SpwP
datamart_id
integer
uqK1nIMmTAn6
audience_builder_id
integer
cZe7evLowSbp
PUT
https://api.mediarithmics.com/v1/data_file/data?uri=mics://data_file/tenants/{organisation_id}/dashboards/{datamart_id}/AUDIENCE_BUILDER-{audience_builder_id}.json
organisation_id
integer
UFX1xf9M0BWy
datamart_id
integer
uhpUbCPUJ0Gm
audience_builder_id
integer
5Rm1gDwXgxFe
In ordre to be able to select audience features thanks to final values, you should first import your final values thanks to a csv file. For more information about the search by final feature, please read the search by final value feature guider.
Your csv file should have:
The following format: 1 level min and 8 levels max, final_value,
Example
A maximum of 100 000 lines, each line should match your schema,
Final values' field of type String
or [String]
.
POST
https://api.mediarithmics.com/v1/datamarts/{datamart_id}/reference_table_job_executions
datamart_id
integer
The ID of the datamart
file
string
The name of the file you want to import. Ex: "@final_value_file.csv"
POST
https://api.mediarithmics.com/v1/datamarts/{datamart_id}/reference_table_job_executions
datamart_id
integer
Od2HfDMVLPel
file
string
kUYOfU4QZxF3
Example