When creating a segment, after you choose a filter, you must choose an operator. Based on the operator you choose, it provides you with flexibility over how the filter is applied. For example, when choosing the filter "Registration Source", you could choose either the operator "is equal to" or "is not equal to". Depending on which one you pick, the filter will behave differently. Therefore, it's important to understand how the operators work. There are two types of operators: data operators and day/date operators.
Using data operators
These operators are applied to pieces of data, such as registration source or location information. The eight data operators are:
- Equal To
- Not equal to
- Does not contain
- Not like
- Not in
Equal To / Not Equal To: This checks for an exact match (but not case-sensitive) for data. For example, if you wanted all users with a registration source of "Facebook", you would use "Equal to" "Facebook". If you wanted users from any registration source except for Facebook, you would use "Does not equal to Facebook". You can also use multiple words, like "Google Paid Search".
Contains / Does Not Contain: This should be used to find a value anywhere in your data. For example, if your brand runs multiple giveaways, "Registration Source Contains 'giveaway'" will return all users with a Registration Source of "store giveaway, "website giveaway", "giveaway from email", and "giveaway".
Like / Not Like: Similar to "contains", "like" is used to find a value anywhere in your data, but includes the use of "wildcards". Wildcards are special characters that help you find "partial matches". For example, you may want registration sources that start with Google. In this case, you can use the % wildcard, which means "any characters at all". Using "registration source like 'google%'" will return "Google paid search", Google organic search", and "Google". It will NOT return "Organic Google", because the value does not start with Google. The special character "_" (underscore), means "any single character". If you wanted any zip codes that start with "9000", you can use "zip code like '9000_'", which would return "90001", "90002". It would NOT return "90002-1780", because there is more than one character after "9000".
In / Not In: This is used when you want to match on a list of values. For example, instead of creating three different "equal to" operators for "state equal to 'NY'", "state equal to 'CA'", and "state equal to 'FL'", you can just use one "in" operator: "state in 'NY,CA,FL'". Lists of values are always separated by commas.
Using day and date operators
There are also operators that are applied to filters related to date and day:
The ten date and day operators are:
- Equal To (date)
- Not equal to
- Before or equal to
- After or equal to
- Equal to (integer) (days in the past)
- Over or equal to (days in the past)
- Within or equal to (days in the past)
By Date: Operators "Equal To (date)" though "Today" above will allow you to filter actions by date. For example, you may want to segment out users who have a signup date that is before or on December 31, 2016. You would use: "signup date is equal to or before 'December 31, 2016'". We have a handy date selector in segment builder so don't want to sweat the date format. As another example, if you wanted anyone who had a signup of today, you can use "signup date is today". When using this option, you will see an additional checkbox for "or is blank". When checked, you will get signups from today, and signups that have no date. If unchecked, you will get signups from today only.
By Days: The last three operators listed that end in "(days in the past)" allow you to segment by a specified number of days. For example, you may want to build a cohort of users that have opened an email within the last 90 days. You would use “Last Email Open At is within or equal to '90' days in the past". This method always includes today in your segment.
Please sign in to leave a comment.