/i/cohorts/add

Create new cohort

Create new cohort with provided steps and returns cohort id

Steps are objects describing conditions user must meet to enter the cohort.
Each step must contain:

  • event - event key to define which event user should have or should have not done
  • type - type of action, which is a string of "did" or "didnot" do event
  • period - amount of last days to check, "1days", "2days", "3days", "ndays", or "all" for all time
  • query - JSON encoded mongodb string to query drill documents, same as drill query

You may use countly internal events as event keys too, such as:

  • [CLY]_session for sessions
  • [CLY]_crash for crahses
  • [CLY]_view for views
  • [CLY]_action for actions
  • [CLY]_push_action for actions performed on push notifications
Language