Last modified January 21, 2019 by Shelly Wolfe

What are the differences between payloads and user properties?

Payloads and user properties are sent to Swrve in a similar fashion, but are intended for much different purposes. There is a 500 key/value limit on payload data, since each payload is constantly being calculated and processed. Currently, there is no limit on user properties, although only some properties can be pulled out of Swrve (location, spend, age). With the exception of those previously listed, user properties are mainly used to create behavioral segments. We recommend sending data about users at a given period in time as payloads on an event to see where users are at the time they trigger that event and to target your campaign audiences on a more granular level.


When to send a payload

Payloads are used to give information around the event being sent. Let’s say your event is audio.stream — you may want to send a payload to include information about the state of users when they they listen to an audio track, such as the song name, artist, album name, or genre. This data is static and represents the user at the time they triggered that event. Overloading Swrve with payload data to later mine it out won’t work, since the data is capped at 255 characters of key/value pairs and numerical values are bucketed.

Examples of good payloads

  • Current subscription level
  • Destination city, number of children travelling, priority boarding purchased
  • Song name, artist, album name, music genre
  • Retail category
  • Finance loan amount or term

Examples of bad payloads

  • All equipment owned (will use payload limit)
  • Coin balance (will be bucketed in large ranges)
  • Email address (will use payload limits)

When to send a user property

User properties identify the attributes of users in your app and are the backbone for behavioral segments. Good user properties help create compelling and measurable segments. Swrve also tracks some behavior properties automatically.

Swrve default user properties

  • Lifetime Spend
  • Lifetime Minutes Played
  • Number of Purchases
  • Number of Sessions

Examples of good custom properties

  • Coin Balance
  • Level
  • XP

Examples of bad custom properties

  • Finished.Level.1, Finished.Level.2, Finished.Level.3

You can also use events to power behavioral segments. The has fired event predicate enables you to leverage the events you’ve already sent to create powerful segments. The following are some examples:

  • Struggling Player = has fired eventPlayerDeath at least 10 times AND Level = 1.
  • Cheater = has fired event Swrve.invalid_iap at least 1 time.
  • Non-cheater = has not fired event Swrve.invalid_iap.

On mobile platforms, the Swrve SDK also automatically tracks the following properties for you:

  • Device
  • OS
  • OS Version
  • Language