Sending Segmentation Data
Player Events:
These are the things that the player does in the game. Very important for segmentation. Typically these should match every event you’re sending to your analytics system. You can name them however you want, and you can pass any number of attributes to them. Ideally they should be triggered immediately when the player does the action.
this.userwise.AssignEvent(
new PlayerEvent("event_logged_in", new List<PlayerAttribute> {
new PlayerAttribute("new_player", false, AttributableDataType.BOOLEAN),
}),
null
);
Player Attributes:
These are the fields that every player has, but they could change over time. Think of current level, current coins, ad creative ID they saw, etc. Again they should be kept as in sync with UserWise as possible. So every time that coin balance goes up and down > update the attribute in UserWise as they can be very important for segmentation.
this.userwise.SetAttributes(new List<PlayerAttribute> {
new PlayerAttribute("coins", 1000, AttributableDataType.INTEGER),
new PlayerAttribute("ltv", 125.50, AttributableDataType.FLOAT),
new PlayerAttribute("login_datetime", DateTime.UtcNow.ToString("o"), AttributableDataType.DATETIME),
new PlayerAttribute("season_spring_2021_passholder", true, AttributableDataType.BOOLEAN),
new PlayerAttribute("guild_name", "My Guild", AttributableDataType.STRING)
}, null);
Regions:
These are often less used as they only pertain to triggered campaigns. But if you want to be able to trigger certain actions that happen based on certain segments of players going to a certain part of the game, you’ll need to add regions in. Think - whale’s with < 1000 Coins remaining going to the store > pop-up something special.
this.userwise.TransitionToRegion(
new Region("team_battle", new List<RegionMetadata> {
new RegionMetadata("team_one_power", 115, AttributableDataType.INTEGER),
new RegionMetadata("team_two_power", 258, AttributableDataType.INTEGER)
}),
null
);
Powered by UserWise