Segment builders
You have access to three tools to segment your audience using queries:
Leverage audience features 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 OTQL.
Standard segment builder set up
You enable this feature when you set up at least:
One segment builder
One audience feature.
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.
List standard segment builders
GET
https://api.mediarithmics.com/v1/datamarts/{datamart_id}/audience_builders
Path Parameters
datamart_id
integer
The ID of the datamart
Get a standard segment builder
GET
https://api.mediarithmics.com/v1/datamarts/{datamart_id}/audience_builders/{audience_builders_id}
Path Parameters
datamart_id
integer
The ID of the datamart
audience_builders_id
integer
The ID of standard segment builder you want to get
Create a standard segment builder
POST
https://api.mediarithmics.com/v1/datamarts/{datamart_id}/audience_builders
Path Parameters
datamart_id
integer
The ID of the datamart
Request Body
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
You cannot create more than 20 standard segment builder instances per datamart.
Edit a standard segment builder
PUT
https://api.mediarithmics.com/v1/datamarts/{datamart_id}/audience_builders/{audience_builders_id}
Path Parameters
audience_builders_id
integer
The ID of the standard segment builder to edit
datamart_id
integer
The ID of the datamart
Request Body
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
Dashboards API
This API helps you upload dashboards.
List dashboards for standard segment builder
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
Path Parameters
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
Create & edit dashboards for standard segment builder
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
Path Parameters
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
Final values import
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.
Requirements
Your csv file should have:
The following format: 1 level min and 8 levels max, final_value,
Example
Don't need to specify UserPoint for the level1, it's implicit.
A maximum of 100 000 lines, each line should match your schema,
Final values' field of type
String
or[String]
.
API
Upload final values csv file
POST
https://api.mediarithmics.com/v1/datamarts/{datamart_id}/reference_table_job_executions
Path Parameters
datamart_id
integer
The ID of the datamart
Request Body
file
string
The name of the file you want to import. Ex: "@final_value_file.csv"
Example
Last updated