Last modified April 14, 2015 by Shelly Wolfe

About Audience Filters

When you create a new segment or campaign, the audience builder enables you to define multiple filters and highly customize the targeting of your resource A/B tests and campaigns. This article provides detailed information on the filter modes and types, the default or custom properties they are derived from, and how to use filters to create customized, targeted segments or campaigns.

Audience Builder

The audience builder is displayed when you create new segments or when you define your target audience on the Set Target screen of the campaign setup workflow.

Audience Filter

The audience builder enables you to create basic or advanced filters, to filter by data type, and then to further narrow down your targeted audience using a combination of user properties, operators (for example: is, is not, equals, is greater than, is less than), values, and conditions (for example: language is English OR French).

The following sections describe the filter modes, data types, filters available, and the values you can enter for certain fields. The values provided are not an exhaustive list, but if necessary, you can look up examples of user property values in the user database downloads available for your app. For more information, see Manually Downloading User Databases.

Click the filter descriptions link to view detailed descriptions for that tab.


Filter Mode

Swrve’s audience builder now includes the option to create filters in Simple or Advanced mode, enabling you to create basic or advanced combinations of filters using AND/OR logic.

Simple Mode

Simple mode enables you to create basic filters where the audience must match all or any of the selected criteria.

  • Users must match all criteria – targeted users must match all of the selected filters (for example, language is French AND location is France).
  • Users can match any criteria – targeted users can match any of the selected filters (for example, language is French OR location is France).

Advanced Mode

Advanced mode enables you to combine groups of AND/OR filters in different configurations to create more complex filters.

  • AND – targeted users must match all of the selected filter groups. Within each group, you can specify additional OR filters.
  • OR – targeted users can match any of the selected filter groups. Within each group, you can specify additional AND filters.

Segments

The Segments tab enables you to create a new segment based on the filter definition of an existing user segment. If you include a segment filter, then this filter targets active users who qualify for membership of the selected segment. For example, if you wanted to track French-speaking, Engaged users, you could create a new segment based on an existing Engaged segment, with an additional filter for the French language demographic.

Filter Name Description Possible Values
Users who Displays a list enabling you to either include all users in a selected segment or all users not in a selected segment. match the filter for, don’t match the filter for
Segment Displays a list of all segments that you have created or that Swrve automatically creates as part of an in-app message, conversation or push notification campaign. Depends on segments available to your app. Select an option from the list to either target all users in that segment or all users not in that segment.

Campaigns

The Campaigns tab enables you to filter on audience exposure and interaction (past or present) to specific in-app message campaigns or resource A/B tests.

Filter Name Description Possible Values
Campaign Type Select a campaign type to target users exposed to or not exposed to a certain campaign or resource A/B test. For more information about the options available with each campaign type, see below. In-App Messages, Resource A/B Testing

Campaign Type – In-App Messages

Filter Name Description Possible Values
Campaign Name Displays a list of active, paused or archived in-app message campaigns created for your app. (You cannot target campaigns that are in Draft status.) Depends on the available in-app message campaigns. Select a campaign to display further targeting options.
Users who Displays a list of options related to a user’s exposure to and interaction with the in-app message. saw the message, didn’t see the message, clicked the message, saw but didn’t click the message
Variant Displays only if the selected campaign includes A/B test variants. Depends on the available variants for the selected campaign. Select an option from the list to target users that have or haven’t interacted with any variant, or a selected message variant. You can also use the OR operator to select multiple variants.
Recency Displays a list of options that enable you to target users who interacted with the message at anytime or within the last X number of days. anytime, in the last [Enter Days] days

Campaign Type – Resource A/B Testing

Filter Name Description Possible Values
Campaign Name Displays a list of resource A/B tests that have been created for your app. Depends on the available resource A/B tests. Select a test to display further targeting options.
Users who Displays a list of options related to a user’s exposure to the selected resource A/B test. have been exposed to, have not been exposed to
Variant Displays a list of variants included in the selected resource A/B test. Depends on the available variants in the selected test. Select an option from the list to target users that have or haven’t been exposed to the selected variant. You can also use the OR operator to select multiple variants.

Purchases

The Purchases tab enables you to filter based on purchase-related behavior such as the total amount spent or the total number or recency of in-app purchases. For more information about purchase recency options, see Event Recency Operators. You can also target users who have or have not purchased a specific item or items. To target specific items, they must first be available in the app. For information on adding items to your app, see Managing Resources and the Swrve Items API Guide.

Filter Name Description Possible Values
have spent The total amount, in USD, that a user has spent in your app, as derived from iap events. Any numeric value. Depending on the operator you select, you can enter a single value (for example, more than, 10) or a range of values (for example, between, 10 and 20).
have purchased The total number of validated in-app purchases a user has made in your app. For a purchase to be validated, you need to also send the Apple or Google receipt. Same as above.
made their first purchase The recency of the user’s first valid in-app purchase, based on a set number or range of days, or in relation to another event. If you select between, more than or in the last, enter any numeric value or range of values indicating the number of days relevant to the user’s first purchase.
If you select before they triggered event, select the event from the list.
made their most recent purchase The recency of the user’s most recent valid in-app purchase, based on a set number or range of days, or in relation to another event. If you select between, more than or in the last, enter any numeric value or range of values indicating the number of days relevant to the user’s most recent purchase.
If you select before they triggered event, select the event from the list.
have made invalid purchases The total number of invalid in-app purchases a user has made in your app. For this number to be validated, you also need to send verification from Apple or Google. Any numeric value. Depending on the operator you select, you can enter a single value (for example, more than, 10) or a range of values (for example, between, 10 and 20).
haven’t made any purchases Targets users who have never made a valid in-app purchase in the app. N/A
have purchased particular item(s) Targets users who have purchased a specific item, counting both purchases with real-world and virtual currency. Depends on the available items for your app. Start typing to filter the available items and select an option from the list to target users that have purchased that item. You can also use the OR operator to select multiple items.
haven’t purchased particular item(s) Targets users who haven’t purchased a specific item, counting both purchases with real-world and virtual currency. Depends on the available items for your app. Start typing to filter the available items and select an option from the list to target users that haven’t purchased that item. You can also use the OR operator to select multiple items.

Demographic

The Demographic tab enables you to filter on user demographics such as language, location or age.

Filter Name Description Possible Values
Language The device language, as set in the swrve.language property. Depending on the operator you select (is, is not), select a language from the Select Language list to target users in or not in that language category. Use the OR function to select more than one language.
Location The device location, configured as a custom property called location.
Note: The Swrve SDK does not collect this information by default—it needs to be configured it as a custom property. For information on creating custom properties, see the platform-specific Integration Guide.
Enter any text value describing the location name (for example, city, state, country). You can use the operator selections to include locations that contain certain words, or that begin or end with certain words.
Gender The user’s gender, configured as a custom property called gender.
Note: The Swrve SDK does not collect this information by default—it needs to be configured it as a custom property. For information on creating custom properties, see the platform-specific Integration Guide.
Enter a text value describing the the gender you wish to target (male, female).
Age The user’s age, configured as a custom property called age.
Note: The Swrve SDK does not collect this information by default—it needs to be configured it as a custom property. For information on creating custom properties, see the platform-specific Integration Guide.
Enter any numeric value. Depending on the operator you select, you can enter a single value (for example, is greater than, 18) or a range of values (for example, is between, 18 to 30).
Timezone Name The device timezone, as set by the swrve.timezone_name property. Enter a text value for the timezone you wish to target. The format depends on how the timezone is set in the device platform; for example America/Los_Angeles, GMT-08:00 or UTC. For a list of timezones, see https://www.iana.org/time-zones.
ADVANCED
Referrer ID The referrer channel and name as provided by the swrve.referrer_id user property. This property may not be automatically sent and is usually set up to use via an attribution provider. For information on setting up your app to track user acquisition, see the User Acquisition Tracking Guide. Any text value representing the referrer name. The recommended format is [CHANNEL_NAME].[CAMPAIGN_NAME] (for example, Facebook.ChristmasPromo).
Referrer Cost (USD $) The total cost of the referrer channel, as provided by the swrve.referrer_cost user property. This property may not be automatically sent and is usually set up to use via an attribution provider. For information on setting up your app to track user acquisition, see the User Acquisition Tracking Guide. Any numeric value representing the cost, in USD, of the referrer. Depending on the operator you select, you can enter a single value (for example, is greater than, 10) or a range of values (for example, is between, 10 to 20).

Engagement

The Engagement tab enables you to filter on engagement-related criteria such as the number of app sessions and the lifetime minutes spent in the app.

Filter Name Description Possible Values
were last active The number of days since the user was active, based on the last_active property. Any numeric value representing the number of days ago the user was active. Depending on the operator you select, you can enter a single value (for example, in the last, 7) or a range of values (for example, between, 30 and 60).
installed the app The number of days since the user first installed the app, based on the date_joined property. Any numeric value representing the number of days since the user installed the app. Depending on the operator you select, you can enter a single value (for example, in the last, 7) or a range of values (for example, between, 30 and 60).
have spent a total time in app of The total number of minutes that the user has spent in the app, based on the start and end of a session (session.start, session.end). Any numeric value representing the minutes the user has spent in-app. Depending on the operator you select, you can enter a single value (for example, more than, 320) or a range of values (for example, between, 160 and 320).
have used the app The total number of times the user has used the app. Any numeric value representing the number of times. Depending on the operator you select, you can enter a single value (for example, more than, 3) or a range of values (for example, between, 3 and 10).

Properties

The Properties tab enables you to filter on custom user properties. Your development team must create any custom properties during initial integration of Swrve into your app, and then the property is available in the Select Filter Type list for targeting and segmenting of your users. For example, you might create a custom property called premium, and then target non-premium users and premium users.

The value you enter for custom properties depends on the app platform and how the property was configured. For example, the Swrve Android SDK only supports string properties, while iOS property values can be an integer or string. For more information on creating custom properties, see the platform-specific Integration Guide.

Date User Properties

Swrve now supports using DateTime properties to target customers (for example, the date and time of an event, such as a flight departure, concert or conference talk). For information on the operators used for DateTime properties, see below. When matching on a given property for any of the operators, if the property isn’t set yet by a given user, they will not match the filter. This is also true for the is not operator—a user without a property won’t match unless they actually have a valid DateTime set.

For more information, see How Do I Target My Audience Using Date User Properties? 

DateTime Format

Swrve recommends using the typed property function introduced in SDK version 4.7 (for more information, see the relevant SDK Release Notes). Otherwise, you must send DateTime properties in the following ISO8601 format: YYYY-MM-DDTHH:MM:SS.000Z. For example, 2016-03-11T09:29:33.915Z. You should convert the DateTime to UTC, otherwise it will not work as expected.


Events

The Events tab enables you to filter on custom events. Events can be any action you want users to perform, and must be configured when integrating Swrve into your app. The Swrve SDK automatically sends certain default events, while you can also configure custom events to track any user action you require. For more information, see the platform-specific Integration Guide.

The operators available on the Events tab allow you to filter either based on the total count of the event or the recency of the event. For more information, see Event Recency Operators.

Event Name Description Possible Values
Swrve.first_session Sent when the SDK initializes for the very first time for an app on a given device. This event is not sent again unless the user uninstalls and then reinstalls the app again (or the app data is deleted). If you select triggered event, enter any numeric value or range of values relevant to the selected event.
If you select first triggered event or last triggered event and then select betweenmore than, or in the last, enter any numeric value or range of values indicating the number of days relevant to the selected recency.
If you select first triggered event or last triggered event and then before they triggered event, select the event from the list, and then select first instance or last instance from the subsequent list.
Swrve.session.start Sent when the user starts an app session. Same as above.
Swrve.Messages.app_launch This event has been deprecated, but refers to a cross-promotion install, for example, promoting other titles within your app portfolio. (That is, when a user installed the app from a cross-promotional message.) Same as above.
Swrve.Messages.campaigns_downloaded Sent when the device downloads campaigns (in-app messages). Same as above.
Swrve.Messages.Message-*.click Used for reporting purposes, when a user clicks a button in an in-app message, that does not have a dismiss action. Same as above.
Swrve.Messages.Message-*.impression Sent every time a user sees an in-app message. Same as above.
Swrve.Messages.click_thru This event has been deprecated, but with app_launch, was sent when a customer clicked ‘install’ in a cross-promotional message. Same as above.
Swrve.Messages.message_returned Sent when an in-app message is triggered from within an app. Same as above.
Swrve.Messages.Push-*.engaged Sent when a user engages with a push notification. Same as above.
swrve.permission.ios.[permission_name].off or .on (iOS only) Sent when the status changes for a permission (from active to inactive and vice versa). Same as above.
Swrve.push_notification_permission (iOS only) Used to trigger the dialog that prompts a user to give push notification permission. Same as above.
Swrve.session.end Sent when the users ends an app session. Same as above.
Swrve.signature_invalid Sent when someone has attempted to externally alter the information stored by the SDK (for example, campaigns, resources). Same as above.
Swrve.user_properties_changed Sent by the server when a user property changes. Same as above.
Swrve.user_purchase Sent when a customer completes a purchase. Same as above.

Device

The Device tab enables you to filter on device-related criteria such as device name, operating system or version. Certain device properties are automatically sent to Swrve by default at initialization. For more information on default user properties, see Swrve User Properties.

Filter Name Description Possible Values
Device Name The device name taken directly from the device, as captured by the swrve.device_name property. Enter a text value describing the device name; for example, iPhone5,1, samsung SCH-I535.
Note: iOS device names are predictable and take the form <DeviceName><MajorVersion>,<MinorVersion>. For example:

  • iPhone5,1 (iPhone 5)
  • iPhone6,2 (iPhone 5s)
  • iPhone7,1 (iPhone 6 Plus)
  • iPad2,5 (iPad mini)
  • iPad4,1 (iPad Air)

Android devices are less predictable and depend heavily on the OS to report a coherent name. For more information on device name syntax, see How Do I Capture Device Type and Location?

App Version The app version on the device, as captured by the app_version property. This property is taken from the app itself. Select an available value from the Select App Version list.
OS The operating system of the device, as captured by the swrve.os property. Enter a text value of the device operating system; for example, iOS, Android.
OS Version The operating system version, as captured by the swrve.os_version property. Enter a text/numeric value of the operating system version; for example, iPhone OS 8.1.3 or 4.2.2 (for Android).
SDK Version The version of the Swrve SDK being used, as captured by the app. swrve.sdk_version property. Text/numeric value of the Swrve SDK version; for example, iOS 3.3, Android 2.3, Unity 3.3.2.
Unity Version The version of Unity used to build the app (if applicable), as captured by the swrve.unity_version property. Enter the numeric value of the Unity version; for example, 4.6.3. To target all users within a main release, you could use the starts with operator, and then enter only the first or second digit (for example, starts with, 5.0).
App Store The app store the app was downloaded from, as captured by the swrve.app_store property. Enter a text value of the app store name; for example, Apple, Google, Amazon.
Device DPI The dots per inch (DPI) in pixels of the device screen, as captured by the swrve.device_dpi property. Enter any numeric value representing the DPI in pixels. Depending on the operator you select, you can enter a single value (for example, is greater than, 320) or a range of values (for example, is between, 160 to 320).
Device Width The width of the device in pixels, as captured by the swrve.device_width property. Enter any numeric value representing the device width in pixels. Depending on the operator you select, you can enter a single value (for example, is greater than, 320) or a range of values (for example, is between, 160 to 320).
Device Height The height of the device in pixels, as captured by the swrve.device_height property. Enter any numeric value representing the device height in pixels. Depending on the operator you select, you can enter a single value (for example, is greater than, 640) or a range of values (for example, is between, 640 to 1280).
SIM Operator Name The mobile operator of the registered SIM card, as captured by the swrve.sim_operator.name property. Enter a text value of the SIM operator’s name. A list of SIM operators and their associated code is available at http://www.imei.info/operator-codes/.
SIM Operator Country ISO Code The two-letter ISO country code of the mobile operator, as captured by the swrve.sim_operator.iso_country_code property. Enter a text value of the two-letter ISO country code; for example, GB (Great Britain), US (United States). A list of country codes is available at https://www.iso.org/obp/ui.
SIM Operator Mobile Code The unique number assigned to every mobile operator in all countries of the world, as captured by the swrve.sim_operator.code property. Enter the numeric value of the SIM Operator Mobile code. The operator code consists of two parts: the Mobile Network Code (MNC) and Mobile Country Code (MCC). A list of operator codes is available at http://www.imei.info/operator-codes/.

Operators

The operators available when you create a new filter depend on the data type and filter selected. The value may be fixed (for example, Select Segment list), numeric only (for example, equals 1), or a combination of text and numbers (that is, a string). For numeric values, if the user property is absent or cannot be recognized as a number, it is treated as 0 for comparisons. For string values, if a user property is absent, it is treated as an empty string for comparisons.

Operator Description Possible Values
String
is The result is equal to the specified filter. Any string value.
is not The result is not equal to the specified filter. Any string value.
contains The result contains the specified filter. Any string value.
does not contain The result does not contain the specified filter. Any string value.
starts with The result starts with with specified filter. Any string value.
ends with The result ends with with specified filter. Any string value.
Number
equals, exactly The result is equal to the specified filter. Any numeric value.
is less than, less than The result is less than the specified filter. Any numeric value.
is at most, at most The result is equal to or less than the specified filter. Any numeric value.
is greater than, more than The result is greater than the specified filter. Any numeric value.
is at least, at least The result is equal to or greater than the specified filter. Any numeric value.
is between,
between
The result falls within the range of the specified filter. Any two numeric values.
is not between The result falls outside the range of the specified filter. Any two numeric values.
Date (for DateTime user properties)
is The date is X days ago or away. Any numeric value.
is not The date is not X days ago or away. Any numeric value.
is between The date falls within the range of the specified values. Any two numeric values.
is not between The date falls outside the range of the specified values. Any two numeric values.
is date The date matches the set date from 00:00 to 23:59:59:59 in the selected time zone. Pick a date from the calendar and select the relevant time zone.
is date between The date falls within the set Start and End dates and times, in the selected time zone. Pick the dates from the calendar, set the time if needed, and select the relevant time zone.

Event Recency Operators

For filter types based on certain events (for example, purchase events, custom events), the options enable you to filter based on either the total count of the event or on the recency of the event.

If you select… Then… Possible Values
have purchased,
have made invalid purchases,
triggered event
Select an operator to specify the number of times the purchase or custom event has been triggered. Any numeric value. Depending on the operator you select, you can enter a single value (for example, more than, 10) or a range of values (for example, between, 10 and 20).
made their first purchase,
first triggered event
Select an operator to specify if the first purchase or instance of the event occurred between, more than, or in the last number of days ago, or if it occurred before the user triggered another event. If selecting an n days ago operator, any numeric value. Depending on the operator you select, you can enter a single value (for example, more than, 10) or a range of values (for example, between, 10 to 20).
If selecting an event, select the event from the list of available events, and then select first instance or last instance from the subsequent list, if applicable.
made their most recent purchase,
last triggered event
Select an operator to specify if the most recent purchase or last instance of the event occurred between, more than, or in the last number of days ago, or if it occurred before the user triggered another event. Same as above.

For more information on how to use event recency filters to target your audience, see How Do I Target My Audience Using Event Recency?


Next Steps