# Filtering

Keitaro allows applying filters for streams.

# Operator "AND" and "OR"

# Operator AND

With operator AND a click must satisfy all the stream filters.

Example:

If a click is iOS device, from Czech but with German language browser, it doesn't get to that stream.

# Operator OR

With OR, a click must satisfy at least one filter.

Example:

Click can be made with iOS device, or IP is from the Czech Republic, or the browser language is English.

# Switch "IS" and "IS NOT"

Almost every filter type has a switch with "IS" and "IS NOT" values.

# IS (allow)

Means that click should have this feature.

For example, if we set up iOS filter, that means only clicks from iOS devices will get to this stream.

# IS NOT (block)

Means only a click without this feature will get to a stream.

For example, we set up iOS filter IS NOT, that means a click with any operational system EXCEPT iOS will get to a stream.

# Example

Let's make a stream:

  • Language: English: IS
  • Country: Czech Republic: IS
  • Operational System: iOS: IS NOT
  • The condition between filters is "AND".

  • Visitor #1. Czech, Windows desktop, English as a browser language. Filters will allow this visitor to a stream, as their click complies with all the filters.
  • Visitor #2. Czech, iPhone with iOS, English as a browser language. The visitor won't get to a stream because of Operational System filter.
  • Visitor #3. Czech, Windows desktop, browser language is unknown. Despite the fact the click meets two of three filters, the click won't get to a stream. There's "AND" condition between filters, and the click lacks browser language to get to a stream. In case, there were "OR" between filters, a click would have got to the stream.

# Filters list

# Date between

Allows setting up dates and time zones when the stream will be enabled or disabled ("IS" – the stream is enabled on these dates, "IS NOT" – the stream is disabled).

# Timetable

Add a timetable. ("IS" to allow, "IS NOT" to exclude).

# Limit clicks

It limits how many clicks can be accepted to the stream. The number of clicks can be limited per hour, per last 24 hours, or total. When the limit of clicks is reached, the stream is switching off.

# Parameter

It checks the incoming parameter.

Masks, regular expressions and @empty meta-word for empty parameters are supported. Filter works as a strict coincidence. If you need partial coincidence use masks or regular expressions ("IS" accepts clicks WITH parameters to the stream, "IS NOT" accepts clicks WITHOUT parameters).

# Referrer

It checks referrer. Masks and regular expressions are supported. Filter works as a strict coincidence. If you need partial coincidence use masks or regular expressions. Example of a masks's usage: google.com for http://google.com/search?q=123 referrer ("IS" accepts clicks WITH referrers to the stream, "IS NOT" accepts clicks WITHOUT, EXCEPT referrers).

# Site

It checks the site. Site gets from the referrer or utm_source parameters.

Masks and regular expressions are supported ("IS" accepts clicks FROM mentioned sites to the stream, "IS NOT" accepts clicks NOT FROM mentioned sites).

# X-Requested-With

It checks x-requested-with header.

Regular expressions are available. Example: /value (a|b|c)/. ("IS" accepts clicks WITH headers to the stream, "IS NOT" accepts clicks WITHOUT, EXCEPT mentioned headers).

# Keyword

It checks keyword property of the click.

Masks, regular expressions and @empty meta-word for empty keywords are supported. Filter works as a strict coincidence. If you need partial coincidence use masks or regular expressions. ("IS" accepts clicks WITH mentioned keywords to the stream, "IS NOT" accepts clicks WITHOUT, EXCEPT mentioned keywords).

::: Inserting a list of values

Switch filter to 'textarea' and paste the list:

keyword1
keyword2
...
1
2
3

:::

# Search Engines

It checks search engine of the click.

Masks and regular expressions are supported ("IS" accepts clicks FROM mentioned search engines to the stream, "IS NOT" accepts clicks NOT FROM mentioned search engines).

# Ad Campaign ID

It checks Ad Campaign ID of the click.

Masks and regular expressions are supported ("IS" accepts clicks FROM mentioned advertising campaigns to the stream, "IS NOT" accepts clicks NOT FROM mentioned advertising campaigns).

# Creative ID

It checks Creative ID property of the click.

Masks and regular expressions are supported ("IS" accepts clicks FROM mentioned creative IDs to the stream, "IS NOT" accepts clicks NOT FROM mentioned creative IDs).

# Empty referrer

It checks if referrer is empty or not ("IS" accepts clicks WITH empty referrer to the stream, "IS NOT" accepts clicks WITHOUT, EXCEPT empty referrers).

# Proxy detected

Checks if proxy is detected or not ("IS" accepts clicks WITH proxy headers to the stream, "IS NOT" accepts clicks WITHOUT, EXCEPT proxy headers).

# City

It checks city of the IP.

Cities are written in English. You can either choose a city from a list, or enter the city's name manually. There are only cities with more than 500k people on the list. ("IS" accepts clicks FROM mentioned cities to the stream, "IS NOT" accepts clicks NOT FROM mentioned cities).

# States/Regions

It checks state or region of the IP ("IS" accepts clicks FROM mentioned regions to the stream, "IS NOT" accepts clicks NOT FROM, EXCEPT mentioned regions).

Regional codes are different in each Geo database. So if you change a database, you need to set up regional filters once again.

# Country

It checks country of the IP ("IS" accepts clicks FROM mentioned countries to the stream, "IS NOT" accepts clicks NOT FROM, EXCEPT mentioned countries).

Adding a list

For a quick input make a list of countries' codes with a space, for example "DE US GB".

# IP

Checks IP address ("IS" accepts clicks WITH mentioned IPs to the stream, "IS NOT" accepts clicks WITHOUT, EXCEPT mentioned IPs).

Masks, intervals and CIDR are supported.

Using masks

Examples:

  • 168.102.233.* — addresses from 168.102.233.0 to 168.102.233.255;
  • 168.102.233.22? — addresses from 168.102.233.220 to 168.102.233.229;
  • 168.102.233.100-150 — addresses from 168.102.233.100 to 168.102.233.150;

Symbols:

  • * — any numbers;
  • ? — any single number;
  • - — interval.
Using ranges

Example:

168.102.233.100 - 168.102.233.150 — addresses from 168.102.233.100 to 168.102.233.150.

Using CIDR

Example:

192.168.2.0/24 — addresses from 192.168.2.0 to 192.168.2.255.

To convert intervals into CIDR or vice versa, use the online service https://www.ipaddressguide.com/cidr.

::: Inserting a list

Split list with symbol ";" and paste to filter. Example of list: 1.2.3.0;2.2.2.0;5.2.3.0 :::

# IPv6

Checks if the click made by IPv6 address or IPv4 ("IS" accepts only IPv6 to the stream, "IS NOT" accepts only IPv4).

# Mobile operator

Check the mobile operator of the device ("IS" accepts clicks FROM mentioned operators to the stream, "IS NOT" accepts clicks NOT FROM, EXCEPT mentioned operators).

# ISP

Checks the internet services provider of the device. ("IS" accepts clicks FROM mentioned providers to the stream, "IS NOT" accepts clicks NOT FROM, EXCEPT mentioned providers).

# Uniqueness

Checks if click is unique or not ("IS" accepts unique clicks, "IS NOT" accepts NOT unique clicks).

Options:

  • For a stream. A click is unique in the current stream
  • For a campaign. A click is unique for a whole campaign
  • For all the campaigns. A lick is unique across the campaigns.

A click becomes unique again after a period set in a campaign's settings. The period is calculated since the very first visit.

# Bot

If device is detected as bot ("IS" accepts bots to the stream, "IS NOT" accepts NOT bot to the stream).

# Connection Type

Checks the connection type of the device ("IS" accepts clicks WITH mentioned connection type to the stream, "IS NOT" accepts clicks WITHOUT, EXCEPT mentioned connection type).

Supported types:

  • Dialup.
  • Cable/DSL.
  • Corporate.
  • Mobile network.

If there's no database, only Cellular, and WiFi are available.

# Browsers

Checks browser of the device ("IS" accepts clicks FROM mentioned browsers to the stream, "IS NOT" accepts clicks NOT FROM mentioned browsers).

You can either choose a browser from a list, or enter the browser's name manually.

Masks and regular expressions are supported.

# Browser Version

Checks browser version of the device ("IS" accepts clicks FROM mentioned browser versions to the stream, "IS NOT" accepts clicks NOT FROM mentioned browser versions).

# Device Model

Checks device model ("IS" accepts clicks FROM mentioned devices to the stream, "IS NOT" accepts clicks NOT FROM mentioned devices).

It's possible to choose values from the list, or enter model name manually.

Masks and regular expressions are supported.

Filter is not strict, which means you can enter "iPhone" for iPhone 5, 6, 6 Plus and others.

# Device Type

It checks device type ("IS" accepts clicks FROM mentioned devices to the stream, "IS NOT" accepts clicks NOT FROM mentioned devices).

Supported types:

  • Desktop computer
  • Mobile phone
  • Tablet
  • Gaming console
  • TV
  • Smart display
  • Camera
  • Portable media player
  • Unknown.

# Operational System

It checks operational system ("IS" accepts clicks made WITH devices with mentioned OS to the stream, "IS NOT" accepts clicks made NOT WITH devices with mentioned OS).

You can either choose a device model from a list, or enter the device model manually.

Masks and regular expressions are supported.

# OS Version

Checks the version of operational system ("IS" accepts clicks made WITH devices with mentioned OS version to the stream, "IS NOT" accepts clicks made NOT WITH devices with mentioned OS version).

# UserAgent

It checks user agent of the browser ("IS" accepts clicks WITH mentioned user agents to the stream, "IS NOT" accepts clicks WITHOUT, EXCEPT mentioned user agents).

Masks and regular expressions are supported. Filter works as a strict coincidence. If you need partial coincidence use masks or regular expressions.

# Languages

Checks the language for the browser ("IS" accepts clicks WITH mentioned languages to the stream, "IS NOT" accepts clicks WITHOUT, EXCEPT mentioned languages).

# Sub ID 1…15

Checks the parameters ("IS" accepts clicks WITH mentioned values to the stream, "IS NOT" accepts clicks WITHOUT, EXCEPT mentioned values).

# Filters FAQ

How masks work?

Add the * (asterisk) symbol to the phrase you are searching to turn on any content at this part of the phrase.

Examples:

  • *keyword. Any content before "keyword".
  • keyword*. Any content after "keyword".
  • *keyword*. Any content both before and after "keyword".
  • keyw*d. Any content between the words.
How to use empty values?

Use the meta-word @empty.

How to use regular expressions?

Regular expressions should be wrapped in slashes. Example: /pattern[0-9]+/. Only PCRE regular expressions are supported Compatible Regular Expressions.

How to test the filters?

Try Traffic Simulation or check the Traffic Log