Operations on User Segments

Last Updated on : 2024-11-07 01:52:47download

You can perform AND and OR operations on multiple labels and label values. This allows you to find intersection sets and union sets among users, helping to identify more precise target user segments.

Nested segments can also undergo intersection and union operations to create new segments.

AND/OR operations on user labels and behaviors

OR operations on multiple conditions

Recommended usage: querying users who meet any one of the specified conditions.

You can perform OR operations to query users meeting any one of the specified conditions. This will yield the union set of these conditions, resulting in an estimated user count.

Example: Assume that the conditions set based on labels are platform is not equal to iOS OR platform is equal to android. The system counts the number of users that meet each condition separately and takes the union set of these conditions with duplicate users removed. Then, it returns the estimated user count as a result.

Operations on User Segments

AND operations on multiple conditions

Recommended usage: querying users who meet all the specified conditions at the same time.

You can perform AND operations to query users with multiple labels. This will yield the intersection set of these labels, resulting in an estimated user count.

Example: Assume that the conditions set based on labels are platform is equal to android AND level-1 category contains lighting. The system counts the number of users that meet each condition separately and takes the intersection set of these conditions. Then, it returns the estimated user count as a result.

Operations on User Segments

AND/OR operations on multiple conditions

To query users with different label values across multiple labels, the system first performs the OR operation to take the union set of users with different values for each label. It then applies the AND operation to intersect these user sets, yielding the final estimated user count.

Example: Assume that the conditions set based on labels are platform is equal to android OR iOS AND level-1 category contains lighting OR small home appliance. The conditions contain two labels: platform and level-1 category. The system first performs the OR operation to identify a user data set for each label type: User Data Set 1 and User Data Set 2. Next, it takes the intersection set of these two data sets to find users who carry both labels. Finally, it returns the estimated user count as a result.

Operations on User Segments

AND/OR operations on nested segments

AND operations on multiple conditions

When performing the AND operation, the system separately counts the users from each segment and then calculates the intersection to obtain the estimated user count.

Operations on User Segments

If the conditions include in and not in, the system will separately count users from each segment during the OR operation to generate several data sets, and then intersect these data sets.

Example: Assumes that you want to query users in the Users with gateways segment or users not in the Newly registered users in 30 days segment. The system treats users with gateways as User Data Set 1 and all app users not in the Newly registered users in 30 days segment as User Data Set 2. It performs a union operation on these two data sets to find the number of users who meet both conditions, returning this as the estimated result.

Operations on User Segments

OR operations on multiple conditions

When performing the OR operation on conditions that only contain the in option, the system separately counts the users from each segment and then calculates the union to obtain the estimated user count.

Operations on User Segments

If the conditions include in and not in, the system separately counts users from each segment during the OR operation to generate several data sets, and then takes the union for these data sets.

Example: Assumes that you want to query users not in the Registered users without devices segment or users in the Users who give feedback on issues segment. The system treats app users not in the Registered users without devices segment as User Data Set 1 and in the Users who give feedback on issues segment as User Data Set 2. It performs a union operation on these two data sets to find the number of users who meet both conditions, returning this as the estimated result.

Operations on User Segments

AND/OR operations on multiple conditions

  • To query users from multiple nested segments based on conditions that include only the in option, the system first performs the OR operation to take the union set for each segment. It then applies the AND operation to intersect these sets, yielding the final estimated user count.

  • When querying users from multiple nested segments based on conditions that include both in and not in options, the system first intersects the users not in a specific segment with all app users before performing operations with other segments.

    Operations on User Segments