User Attributes and Targeting
User attributes allow you to store additional information about users as key-value pairs. Use them to track information such as:
- Game level
- Payer status
- Custom user segments
- Any other data useful to your organization
SDK Setup
This page covers how to set up user attributes in the dashboard.
Important: Attributes only appear in the dashboard filters after they've been sent from the SDK at least once.
For platform-specific implementation details, see:
- Sending User Attributes -- Android
- Sending User Attributes -- iOS
- Sending User Attributes -- Unity
- Sending User Attributes -- React Native
Targeting Based on User Attributes
You can add up to 3 filters per piece of content.
Note: Capping and pacing is only available for currency sale banner content, not Multiple Choice questions.
Example: Targeting Users in France

The screenshot shows a partial list of targeting criteria received by TapResearch. Sending different attributes enables you to target different user segments.

Targeting Operators
String values:
is equal to
- Match a specific value or list of valuescontains
- Match any value in a list
Numerical values:
is equal to
is greater/equal to
is less/equal to

Important Limitations
- Case sensitivity - Attributes are case-sensitive:
test
andTest
are different attributes - Dates - Stored as strings:
2020-01-01
and2020-1-1
are different values - Booleans - Do not use native booleans. Use stringified values (
"true"
) or integers (0
,1
) instead - Integer vs String -
1
and"1"
are different values. For numerical comparisons, send integer values
Built-in Attributes
The SDK automatically sends these built-in attributes:
Country
The user's country location.
- Use 2-letter ISO country codes (e.g.,
US
for United States)
First Seen At
The first time TapResearch saw this user.
- Use ISO8601 date strings:
2020-01-01T00:00:00.000Z
- Use relative dates:
3d
targets users seen more than 3 days ago - Date-only format works:
2020-01-01
equals2020-01-01T00:00:00.000Z
Test Devices
Targets only devices in your Test device list.
- Use for testing content before going live
Audience Percentage
Targets a percentage of users.
- Select groups out of 10 (each group = 10% of users)
- Example: Select 3 groups to target 30% of users
Examples
userAttributes = hashMapOf(
"testStatus" to "VIP",
"testInt" to 2,
"testIntString" to "2",
"vip_status" to "super-vip",
"Some Date" to Instant.now().toString(), // 2023-08-31T10:15:30.00Z
// The below will match on relative dates, so you can filter by "a Month Ago" >= 3d
"a Month Ago" to LocalDate.now().minus(1, ChronoUnit.MONTHS).toString(), // 2023-07-31
"testCAPSUpper" to "CAPS", // Matches "CAPS" but not "caps"
"testCAPSLower" to "caps", // Matches "caps" but not "CAPS"
),
Technical Details
Attribute Caching
User attributes are cached for 1 minute on the backend.
- Changes to attributes may take up to 1 minute to be reflected when querying for content
Caching Examples
Example 1: User Levels Up
Scenario: User sees a placement, levels up, and views the same placement again.
playerLevel = 1 changes to playerLevel = 2
You have two pieces of content, one for level 1 and one for level 2.
- The user shows content for a placement
- The user's level is 1
- The user plays the game and levels up to 2
- The user clicks the placement again and its been less than 1m
- The user sees the same content for that placement, not the level 2 content
Example 2: New Attribute Added
Scenario: You have two pieces of content, one for attribute 1 and one for attribute 2.
attribute1 = 1
You add an attribute
attribute2 = 2
The user has seen a placement, gets an additional attribute they did not have before, and sees new content for that placement
- The user shows content for a placement
- The user has an additional attribute added to their user attributes that did not exist before
- The user clicks the placement again and its been less than 1m
- The user sees the new content for that placement, based on the filters for that content
Example 3: Date Targeting
- Relative dates
- You want to show content to users who have been playing for 1 month
- You'll want to target where
First seen at <= 30d
- Absolute dates
- You want to show content to users who have been playing for 1 month
- You'll want to target where
First seen at <= 2020-01-01T00:00:00.000Z
Example 4: Boolean Values
- A user is a VIP
- String
- Send the attribute
is_vip = "true"
- You'll want to target where
is_vip = "true"
- Send the attribute
- Integer
- Send the attribute
is_vip = 1
- You'll want to target where
is_vip = 1
- Send the attribute
- String
Example 5: Multiple Values
- You have multiple user types and want to target some of them
- Send the attribute
user_type = "vip"
oruser_type = "normal"
oruser_type = "super-vip"
- Target where
user_type = "vip"
oruser_type = "super-vip"
using thecontains
operator in the UI
- Send the attribute
Troubleshooting
Content Not Matching?
Common issue: Sending strings instead of integers
- Sending
"1"
(string) will not match filters expecting1
(integer) - Solution: Send the value as an integer:
1