Skip to main content
A traits event sets traits on a player. Traits are the data that describes a player, such as a level, a difficulty or a Discord ID. Event data stays properties. Unlike identify, a traits event does not need a user ID, so you can describe a player before sign-in. Every SDK sends it with a traits() call: Web, Node, Godot, Unity and Unreal. Without an SDK, send the event to POST /v0/events in the shape below.

Example

A game build sends the traits of one install:

Fields

See common fields for the envelope fields.

Anonymous and user traits

  • Anonymous traits: a traits event without a user_id sets traits on one browser or game install. The profile of an anonymous player shows them.
  • User traits: a traits event with a user_id, an identify, the player traits API and a dashboard edit set traits on the user.
The profile shows one value per trait:
  • For an identified player, the user trait wins.
  • Otherwise, the newest anonymous trait across the player’s browsers and game installs wins.
  • A shared device (an anonymous ID linked to two or more users) gives its anonymous traits to none of those users.

Protected traits

A game or website cannot set the protected traits email, itch_user_id, stripe_customer_id and paddle_customer_id. Manalens drops them from web and app events. Send them from your server with the secret key, or with the player traits API.

How traits update

  • A later event updates only the keys that it sends.
  • A null value clears a key.