Segmentation - Guide


In this guide we will walk you through segmenting players into cohorts. We'll show you a couple of ways to do that including using the Portal to define rules.

Creating a Cohort by Stats

Most of the segmentation in Beamable is to create a cohort by a stat. You can learn more about stats in the Stats page. However, in this guide we are going to show you how to use a default stat DAYS_SINCE_INSTALL to create a cohort that is going to be used in a trial. Trials are A/B testing, which you will learn more about in that section. But this guide will just focus on the part where we create a cohort.

  • Navigate to the Portal and login.
  • Go To Operate → Trials
  • Create a new Trial by clicking on the + Add Trial button
  • Select Custom, and give your cohort a name — we used 7thDayReturningPlayers as our example cohort name.
  • Specify DAYS_SINCE_INSTALL as the stat and set it Equal To the value of 7.

In this trail, we also added these values to complete and save the trial.


What this is doing is creating a trail that can be joined by a cohort. As you will learn in the A/B Testing area, that trials can be used in various places to run experiments. The above will create a cohort called "7thDayReturningPlayers" and all actions can be performed on this cohort from various other parts of Beamable.

Upload CSV to Create a Cohort

Since we now know that you can create a cohort from stats, Beamable provides you with a built in tool to get players into a cohort by creating stat attribution.

This is interesting in a couple of ways. Firstly, it allows you the developer to write queries against your own telemetry and create stats where you can segment your players and create cohorts. This is known in Beamable as Tagging. Secondly, it allows you to very granular with your data and find those cohorts of players that you really want to target.


Navigating in the Portal to Operate → Tagging will take you to the above screen.

1437311035933697, LEVEL, 123
1437311035933697, FOO, bar
1437311035933697, BAZ, 3.14159

This is the format your CSV should be in. The first column is a Gamer_Tag or PlayerId of the player. The second column is your Stat_Name. The third column is your State_Value.


Gotcha: Space the comma

Please note that if you do not put a space between the comma and the key or value, the parser will trim that character. So be sure that your properly format the CSV.

Custom Segmentation Cohort

Sometimes you might want to create a cohort from custom telemetry in your game. You will want to run a query against your Athena Database (See Analytics - Overview) and then create a CSV from that data to where you can put those users into a cohort.

select distinct gamer_tag, stat_name, stat_value from (

    select distinct 
    '   sessions7d' as "stat_name",
        round(avg(cast("e.sessions7d" as integer))) stat_value
    group by 
stat_value > 7

In this query, we are creating a customized set of data based on sessions. You can do this type of aggregation on your own custom telemetry that you write.

1440808287256577, sessions7d, 11
1433550959091713, sessions7d, 25
1428983089015809, sessions7d, 12

This becomes our result, and now we can upload this and have a cohort of users that have more than 7 sessions played.