Players & Segments
Identify players with custom properties and organize them into segments using tags. Segments drive Remote Config overrides — different player groups can get different settings.
Player Properties
Section titled “Player Properties”set_user_property()
Section titled “set_user_property()”QuestData.set_user_property(key: String, value: Variant)| Parameter | Type | Description |
|---|---|---|
key | String | Property name (e.g. "level", "platform") |
value | Variant | Property value (String, int, float, bool) |
Sets a single property for the current player. Sent to the server immediately.
set_user_properties()
Section titled “set_user_properties()”QuestData.set_user_properties(props: Dictionary)Sets multiple properties at once. More efficient than calling set_user_property() multiple times.
Example
Section titled “Example”# Set properties on game startfunc _ready(): QuestData.set_user_properties({ "platform": OS.get_name(), "language": TranslationServer.get_locale(), "game_version": ProjectSettings.get_setting("application/config/version"), "first_launch": true })
# Update as the player progressesfunc _on_level_completed(level: int): QuestData.set_user_property("highest_level", level)
# Track spending tierfunc _on_purchase(amount: float): total_spent += amount if total_spent > 100: QuestData.set_user_property("spending_tier", "whale") elif total_spent > 10: QuestData.set_user_property("spending_tier", "dolphin")Player Tags (Segmentation)
Section titled “Player Tags (Segmentation)”Tags are lightweight labels used for player segmentation. Unlike properties, tags don’t have values — a player either has a tag or doesn’t.
set_user_tag()
Section titled “set_user_tag()”QuestData.set_user_tag(tag: String)| Parameter | Type | Description |
|---|---|---|
tag | String | Tag name (auto-lowercased, e.g. "vip", "beta_tester") |
remove_user_tag()
Section titled “remove_user_tag()”QuestData.remove_user_tag(tag: String)Removes a tag from the current player.
Example
Section titled “Example”# Tag VIP playersfunc _on_purchase_completed(): QuestData.set_user_tag("paying_user") if total_purchases >= 5: QuestData.set_user_tag("vip")
# Tag by play stylefunc _on_game_completed(playtime_hours: float): if playtime_hours > 100: QuestData.set_user_tag("hardcore") elif playtime_hours < 2: QuestData.set_user_tag("casual")
# Remove tag when no longer applicablefunc _on_subscription_expired(): QuestData.remove_user_tag("subscriber")Segments & Config Overrides
Section titled “Segments & Config Overrides”Tags are the building blocks for segments. In the dashboard, create segments by combining tags, then attach config overrides:
- Define segments in Players > Segments (e.g. “VIP Players” = tag
vip) - Add config overrides in Configuration > Remote Config (e.g. “VIP Players” get
max_lives = 10) - SDK fetches automatically — When
fetch_remote_config()is called, the server checks the player’s tags and returns the correct overrides
# In your game code — no segment logic neededQuestData.set_user_tag("vip")QuestData.fetch_remote_config()
# Later, this returns 10 for VIP players, 3 for everyone elsevar lives = QuestData.get_config("max_lives", 3)Player Identity
Section titled “Player Identity”The SDK automatically generates a persistent player_id on first launch, stored in user://quest_player_id.save. This ID survives game restarts and reinstalls (if the user data directory is preserved).
# Read the current player IDvar pid = QuestData.get_player_id()
# Override with your own ID (e.g. from your auth system)QuestData.player_id = "steam_76561198012345"Dashboard
Section titled “Dashboard”- Players > Player Explorer — Search players by ID, view properties, event timeline, session history
- Players > Segments — Create tag-based segments, view player counts per segment
- Configuration > Remote Config — Attach config overrides to segments
How It Works
Section titled “How It Works”Properties
Section titled “Properties”set_user_property()buffers the property locally- Properties are sent to
POST /v1/identifywith the player’s ID - The server stores them as JSONB — queryable in the Player Explorer
set_user_tag()sends a fire-and-forget POST to/v1/players/:id/tags- Tags are stored server-side and used for segment matching
remove_user_tag()sends a DELETE request- Tags are always lowercased for consistency
Best Practices
Section titled “Best Practices”- Set properties early — Platform, language, and version on game start
- Update properties as they change — Level, spending tier, play style
- Use tags for segments — Tags are boolean (has/doesn’t have), properties are key-value
- Keep tag names simple —
"vip","beta","churned"— not"user_who_paid_more_than_100" - Don’t over-segment — Start with 2-3 meaningful segments, add more as needed