# Filter reference (https://webmetic.de/docs/en/segmente/filter-referenz)

In the [segment builder](https://webmetic.de/docs/en/segmente/segment-builder) for [segments](https://webmetic.de/docs/en/segmente), you pick these fields under **Select attribute** after clicking **Add condition**.

## Conditions and groups [#conditions-and-groups]

A condition consists of a field, an operator, and a value. The **Apply condition** button only becomes active once all three are set.

| Element | Rule |
|---|---|
| Several conditions in one group | All of them must be true (AND) |
| **OR** | Starts a new group. A company belongs to the segment if it meets all conditions of at least one group |
| **Add condition** | Always adds the condition to the last group |
| Condition for all groups | If a condition should apply to all groups, repeat it in every OR group. A new group doesn't take over any conditions |
| Removing the last condition of a group | Webmetic removes the whole group |
| Period | Applies to the whole segment, not per condition. A company needs at least one visit inside the segment's period, even if a group only checks company fields |

Which visit counts depends on the field's section:

| Conditions in one group | What must be true |
|---|---|
| Fields under **Company**, **NACE**, and **Tags** | The company meets them, regardless of the visit |
| Fields under **Session** and **User data** | All of them are true for the same visit inside the period |
| Different fields under **User data**, for example **Page path** and **Scroll depth** | All of them are true for the same page view of that visit |
| Two conditions on **Page path** | Both pages occur in the same visit |
| Page A or page B | You need two OR groups with one **Page path** condition each |
| **Page path** or **Page title** with a negation, for example **does not contain** | No visit inside the period has a page view that the condition without its negation matches |

For example, **Page path** **contains** `/preise` and **Session duration** **greater than** `60` in one group finds companies with a visit longer than 60 seconds that included the pricing page.

## Operators [#operators]

| Operator | True when |
|---|---|
| **contains** | The value occurs anywhere in the field |
| **does not contain** | The value doesn't occur in the field |
| **is** | The field matches the value exactly |
| **is not** | The field doesn't match the value |
| **starts with** | The field starts with the value |
| **does not start with** | The field doesn't start with the value |
| **ends with** | The field ends with the value |
| **does not end with** | The field doesn't end with the value |
| **is any of** | The field matches one value from a comma-separated list |
| **is not any of** | The field matches no value from the list |
| **greater than** | The number is above the value |
| **greater than or equal** | The number reaches or exceeds the value |
| **less than** | The number is below the value |
| **less than or equal** | The number doesn't exceed the value |
| **regex** | The field matches the regular expression |

Which operators you use depends on the type of field:

| Field type | Fields | Operators |
|---|---|---|
| Text | **Company name**, **City**, **Page path**, **Page title**, **NACE activity** | **contains**, **does not contain**, **is**, **is not**, **starts with**, **does not start with**, **ends with**, **does not end with**, **is any of**, **is not any of**, **regex** |
| Postal code | **Postal code** | The text operators, plus **greater than**, **greater than or equal**, **less than**, and **less than or equal** |
| UTM | **UTM medium**, **UTM campaign**, **UTM term**, **UTM content** | The text operators without **is any of** and **is not any of** |
| Number | **Session duration**, **Session time** | **greater than**, **greater than or equal**, **less than**, **less than or equal** |
| Selection | **Employees**, **Revenue**, **Country**, **Industry**, **Scroll depth**, **Tag** | **is**, **is not** |
| NACE selection | **NACE section**, **NACE division**, **NACE code** | **is**, **is not** |

## Company [#company]

The fields under **Company** check details about the company.

| Field | What it checks | Operators | Values |
|---|---|---|---|
| **Company name** | The company's name | Text | Free text |
| **Employees** | The size by number of employees | Selection | 1–10, 11–50, 51–200, 201–500, 501–1.000, 1.001–5.000, 5.001–10.000, 10.000+. Several ranges mean: any of them |
| **Revenue** | The annual revenue | Selection | Several ranges mean: any of them. There are nine ranges in euros, from 0–100.000 to 500 Mio.+ |
| **Postal code** | The postal code of the address | Postal code | Free text |
| **City** | The city of the address | Text | Free text |
| **Country** | The country of the address | Selection | Only countries that occur among your companies. Germany, Austria, and Switzerland come first |
| **Industry** | The company's industries. A company can have several | Selection | 19 fixed industries, for example Industrie & Fertigung |

The industry names, NACE descriptions, and the employee and revenue ranges appear in German, with German number format, in the English dashboard too. For **Industry**, **is** is true if one of the company's industries is selected. The **is not** operator excludes every company that has one of the selected industries.

## Visit [#visit]

The fields under **Session** check a single visit.

| Field | What it checks | Operators | Values |
|---|---|---|---|
| **UTM medium** | The visit's medium | UTM | A selection for **is** and **is not**, free text otherwise |
| **UTM campaign** | The value of `utm_campaign` | UTM | As for **UTM medium** |
| **UTM term** | The value of `utm_term` | UTM | As for **UTM medium** |
| **UTM content** | The value of `utm_content` | UTM | As for **UTM medium** |
| **Session duration** | The duration of the whole visit | Number | Seconds, decimals allowed |
| **Session time** | The average time per page view: the visit's duration divided by its number of page views | Number | Seconds |

The UTM values come from the first page of the visit. For **is** and **is not**, you pick from up to 200 values that occur in visits to your website. You can pick several values, for example two spellings of a campaign. With **is**, any of them matches, with **is not**, none of them. If you switch from **is** or **is not** to a text operator, Webmetic clears the field.

**UTM medium** has a value even without UTM parameters, for example from the referring website or an ad's click ID. That's why **UTM medium** **is** `organic` also finds visits from search engines. Visits without any sign of where they came from have the medium `(none)`. For details, see [Campaigns and channels](https://webmetic.de/docs/en/visitor-intelligence/kampagnen-und-kanaele).

## Page view [#page-view]

The fields under **User data** check single page views of a visit.

| Field | What it checks | Operators | Values |
|---|---|---|---|
| **Page path** | The page's full address with `https://`, host name, parameters after the `?`, and anchor | Text | Free text |
| **Page title** | The page title as the browser tab shows it | Text | Free text |
| **Scroll depth** | The deepest step someone scrolled to on the page | Selection | 25%, 50%, 75%, 90%. With several steps, **is** matches any of them and **is not** none of them |

Because **Page path** checks the whole address, use **contains** with the path, for example `/preise` or `/pricing`.

A negation on **Page path** or **Page title** checks every visit inside the period. **Page path** **does not contain** `/careers` therefore excludes every company that viewed a careers page inside the period.

**Scroll depth** **is** 75% finds page views that reached exactly this step. For at least 75%, choose 75% and 90%.

## NACE [#nace]

The fields under **NACE** check the company's NACE codes. Webmetic assigns them from the company's website. A company can have several codes, and a condition checks all of them.

| Field | What it checks | Operators | Values |
|---|---|---|---|
| **NACE section** | The section, for example C | NACE selection | All sections with description |
| **NACE division** | The division with the section's letter, for example J62 | NACE selection | Grouped by section, with search |
| **NACE code** | The four-digit class, for example 62.01 | NACE selection | Grouped by division, with search |
| **NACE activity** | The German descriptions of section, division, and class | Text | Free text in German, for example `Maschinenbau` |

The **is** operator is true if one of the company's codes matches. A negation such as **is not** is true if none of the codes matches, also for companies without a NACE code. The **NACE activity** field doesn't find English terms.

## Tags [#tags]

| Field | What it checks | Operators | Values |
|---|---|---|---|
| **Tag** | Whether the company has a tag | Selection | One tag of your account per condition |

For several tags, add several conditions. In one group all of them must be true, while in separate OR groups one is enough. For details, see [Assign tags](https://webmetic.de/docs/en/visitor-intelligence/tags).

## Matching rules [#matching-rules]

| Rule | What applies | Example |
|---|---|---|
| Upper and lower case | Webmetic ignores it | `münchen` finds München |
| Special characters | **contains**, **starts with**, and **ends with** read the value as plain text. Only **regex** reads it as a pattern | `/produkte?seite=2` |
| List with commas | **is any of** and **is not any of** split the value at every comma. On text fields, **is** compares the whole value | **is any of** `München, Berlin` finds both cities |
| Value with a comma | **is** finds it as a whole | **is** `Müller, Schmidt` |
| Spellings | Webmetic doesn't merge variants | **is any of** `München, Muenchen` |
| Empty fields | For fields under **Company**, UTM fields, and **Tag**, **is not** also finds empty values, and for text fields **is not any of** does too. **does not contain**, **does not start with**, and **does not end with** don't. Companies without a NACE code match every negated NACE condition and no other | **Employees** **is not** 1–10 also finds companies without size data |
| **Country** | Every spelling of a country counts | Germany also finds entries stored as DE or Deutschland |
| **Postal code** with **greater than** or **less than** | Webmetic compares the postal code as text, not as a number. Four-digit postal codes from Austria and Switzerland therefore fall into German ranges | **greater than or equal** `80000` also finds Zurich 8048 |

For postal codes, we recommend **starts with**, for example `85`. This operator also finds Swiss postal codes such as 8500. So add **Country** **is** Germany to every postal code condition in every OR group.

On the Free plan, conditions on **Company name**, **City**, and **Postal code** only search the readable companies. For details, see [Free plan](https://webmetic.de/docs/en/visitor-intelligence/unternehmensliste#spot-hidden-companies-on-the-free-plan).

## Next steps [#next-steps]

- [Create a segment](https://webmetic.de/docs/en/segmente/segment-builder): Combine conditions into a segment and save it.
- [Segment recipes](https://webmetic.de/docs/en/segmente/praxisbeispiele): Rebuild ready-made segments for hot leads, sales territories, and target customers.
- [Campaigns and channels](https://webmetic.de/docs/en/visitor-intelligence/kampagnen-und-kanaele): See where a visit's UTM values come from.
