# Filtering

Keitaro allows applying filters for flows.

# Operator "AND" and "OR"

# Operator AND

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

Example:

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

# Operator OR

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

Example:

The 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 a click must have this feature.

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

# IS NOT (block)

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

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

# Example

Let's make a flow:

  • 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 flow, as the click complies with all the filters.
  • Visitor #2. Czech, iPhone with iOS, English as a browser language. The visitor won't get to a flow because of Operational System filter.
  • Visitor #3. Czech, Windows desktop, browser language is unknown. Although the click meets two of three filters, the click won't get to a flow. There's "AND" condition between filters, and the click lacks browser language to get to a flow. In case there were "OR" between filters, a click will go to the flow.

# Filters list

# Date between

Setting up dates and time zones when the flow turn on or turn off ("IS" – the flow is turned on for these dates, "IS NOT" – the flow is turned off for these dates).

# Timetable

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

# Limit clicks

It limits how many clicks can be accepted to the flow. The number of clicks can be limited per hour, per last 24 hours, or total. When the limit of clicks is reached, the flow 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 flow, "IS NOT" accepts clicks WITHOUT parameters).

# Referrer

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

# Site

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

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

# X-Requested-With

It checks x-requested-with header content.

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

# Keyword

It checks the 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 flow, "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 flow, "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 flow, "IS NOT" accepts clicks NOT FROM mentioned advertising campaigns).

# Creative ID

It checks the Creative ID property of the click.

Masks and regular expressions are supported ("IS" accepts clicks FROM mentioned creative IDs to the flow, "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 flow, "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 flow, "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 flow, "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 flow, "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 flow, "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 flow, "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 conversely, use the online service https://www.ipaddressguide.com/cidr.

Inserting a list

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

# IPv6

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

# Mobile operator

Check the mobile operator of the device ("IS" accepts clicks FROM mentioned operators to the flow, "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 flow, "IS NOT" accepts clicks NOT FROM, EXCEPT mentioned providers).

WARNING

Works only with IP2Location database and Keitaro Geo

# Uniqueness

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

Options:

  • For a flow. A click is unique in the current flow
  • For a campaign. A click is unique for a whole campaign
  • For all the campaigns. A click is unique among 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 the device is detected as bot ("IS" accepts bots to the flow, "IS NOT" accepts NOT bot to the flow).

# Connection Type

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

Supported types:

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

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

# Browsers

Checks the browser of the device ("IS" accepts clicks FROM mentioned browsers to the flow, "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 the browser version of the device ("IS" accepts clicks FROM mentioned browser versions to the flow, "IS NOT" accepts clicks NOT FROM mentioned browser versions).

# Device Model

Checks the device model ("IS" accepts clicks FROM mentioned devices to the flow, "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 the device type ("IS" accepts clicks FROM mentioned devices to the flow, "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 the operational system ("IS" accepts clicks made WITH devices with mentioned OS to the flow, "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 flow, "IS NOT" accepts clicks made NOT WITH devices with mentioned OS version).

# UserAgent

It checks the user agent of the browser ("IS" accepts clicks WITH mentioned user agents to the flow, "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 flow, "IS NOT" accepts clicks WITHOUT, EXCEPT mentioned languages).

# Sub ID 1…30

Checks the parameters ("IS" accepts clicks WITH mentioned values to the flow, "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 must 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