There are several ways of configuring rules to label and organise your data.
We support several rule types:
String
Field
Segment
SQL
Mapped
String
If you've got multiple variations of a placement name that you'd like to return with the same label, then you can add multiple conditions. For example, here we want both Ft.com and financialtimes.com to both be 'Financial Times'.
If you select 'OR' then cases where the field contains either of them will be applied. For 'AND', a single field will have to contain both instances. e.g. if certain words separated through the field occur, then they receive one given label.
You can change the Match Type to either an exact match, 'equals', or 'contains' which will search for given words, or exclude both those cases (does not equal/contain), or just search for the beginning and the end of words.
Field
The field rule type lets you set the rule's result field to another field from another table - for example you might want to set a field in your campaigns table equal to a field from your advertisers table.
Segment
If your naming convention is robust and the information within your names spit by a consistent delimiter then you can use the segment rule type to explode your naming convention and grab specific elements to populate your rule's result field.
For example, imagine a placement named as follows:
The Economist_Intelligent Life Economics_Business Culture_Asia_300x250
This might represent Publisher_Topic_Section_Market_Size.
You can define a rule that spits this name up at every underscore and grab a specific segment to different columns in a meta table and use these to create dimensions.
So, if we want to extract the 'Publisher' from the naming convention we would use a Segment rule, set the 'Split by' to '_' and 'Segment' to '1'.
SQL
The SQL rule type allows you to manually enter custom SQL. This is useful for more challenging solutions such as extracting the first 2 characters of a string.
If you're familiar with SQL then this may be your preferred option.
Mapped
A mapped rule allows you to reference a secondary lookup table to get the result value from - for example, joining a country code from a placement and joining to a countries table, then writing the country name from the countries table to our result field.
Datasource = this contains the result value you want to write with your rule
Field = the field that contains the end result value you want to write
Result SQL = this is how we join the table that our result field lives in to the table that contains the result we want to write.
Please note - a Mapped rule assumes that the primary key of the table your are joining to to get the result value is named 'id'