Skip to content
Documentation

Adding filters to segments

Segmentation is a powerful feature in Mautic that allows you to group your contacts based on various criteria such as geographic location, demographics, behavior, and social media data. This is useful for targeted marketing campaigns, as it enables you to send emails, trigger campaigns, or analyze specific groups of contacts with shared characteristics.

Content:

Success

It’s useful to create a plan before the segments to make the whole process faster.

Advanced filters

String matching filters

  • Starts with: This filter selects contacts whose specified field begins with a certain string. Example: Finding contacts whose email addresses start with "info".
  • Ends with: Opposite to 'starts with', this filter targets the end of a string in a field. Example: Finding contacts with email addresses that end with "@example.com".
  • Contains: Useful for finding any occurrence of a string within a field. Example: Finding contacts whose job title contains "Manager".
  • Like: An advanced option that uses the '%' character to define wildcards in string matching. Example: Finding contacts whose email addresses include "customer" (e.g., "customer_service@example.com").
  • Regexp: For the most control, this filter uses regular expressions to match complex patterns within strings. Example: Finding contacts whose phone numbers match a specific format like "(123) 456-7890".

Logical operators

  • AND: Ensures that all specified conditions are true for a contact to be included in a segment. Example: Contacts must be both "subscribed" AND "opened last email".
  • OR: Includes a contact if any of the conditions it separates are true. Example: Contacts are either "subscribed" OR "attended webinar".
  • AND NOT: A variation that includes contacts only if they do not meet the specified condition. Example: Contacts are "subscribed" AND NOT "unsubscribed".

Success

For performance reasons, ensure that segment update queries are optimized to prevent database issues.

Behavioral filters

  • Contacts can be segmented based on whether they visited specific landing pages within a given timeframe.
  • Filter target contacts who have completed a particular form.
  • Contacts who have visited a specific URL can be grouped using this filter.

Note

Mautic's API can be used to manage segment memberships and obtain detailed information about segments.

Where can I set filters?

Steps

Warning

When importing contacts for bulk emails, it's recommended not to update the segments to avoid unintended changes.

  1. Log in to your Mautic account.
  2. Navigate to Segments from the menu and click the +New button to create a new segment.
  3. In the Details tab, enter a Name, Public name, and Description for your segment.
  4. Decide if the segment should be Public and if it should be Available in Preference Center, then set the Active option accordingly.
  5. Go to the Filters tab and add conditions for your segment based on your segmentation criteria. You can use various filters like geographic, activity-based, social media data, and more.
  6. If needed, use AND and OR operators to refine your filters for precise segmentation.
  7. Save your segment once all filters are in place.

Note

If a contact is manually added to a segment, their membership remains regardless of filter changes.

Results

  • A new segment with the specified filters should now be visible in your Mautic Segments list.
  • You can verify the segment by checking if the contacts that meet the filter criteria are included.

Info

When creating dynamic segments, make sure to use the correct operator and time frame to ensure the segment updates as contacts meet the criteria over time.