• Stars
    star
    111
  • Rank 314,510 (Top 7 %)
  • Language
  • License
    MIT License
  • Created about 8 years ago
  • Updated over 6 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Cohort Builder by Keen IO

Cohort Builder

An attractive, custom cohort tool that can be used by your team or your customers. Running this analysis means juggling a lot of complex queries and timeframes. This tool makes that super easy, and in doing so opens up one of the most powerful, valuable types of analysis to be built right into a product.

Cohort Builder, powered by the Keen IO Analysis and Dataviz SDKs

To see the Keen integration in action, create a free project and send some data to it. Then create some charts with just a few lines of code. You chould even use our OSS Dashboards if you want to get extra fancy!

Example usage

<!DOCTYPE html>
<html>
  <head>
    <meta charset="UTF-8">
    <!-- Cohort Builder relies on the Keen IO Dataviz SDK -->
    <link href="https://d26b395fwzu5fz.cloudfront.net/keen-dataviz-1.0.1.css" rel="stylesheet">

    <!-- Cohort Builder CSS -->
    <link href="keen-cohort-builder.css" rel="stylesheet">
  </head>
<body>
  <div id="cohort-chart"></div>
  <div id="cohort-table"></div>

  <!-- Cohort Builder relies on the Keen IO Dataviz SDK -->
  <script src="https://d26b395fwzu5fz.cloudfront.net/keen-analysis-1.1.0.js"></script>
  <script src="https://d26b395fwzu5fz.cloudfront.net/keen-dataviz-1.0.1.js"></script>

  <!-- Cohort Builder JS -->
  <script src="keen-cohort-builder.js"></script>
  <script>
    var keenClient = new Keen({
      projectId: 'YOUR_PROJECT_ID',
      readKey: 'YOUR_READ_KEY'
    });

    var cohortChart = new Keen.Dataviz()
      .el('#cohort-chart')
      .height(100)
      .type('line');

    var cohortTable = new Keen.Dataviz()
      .el('#cohort-table')
      .library('cohort-builder')
      .type('matrix');

    var dateMatrix = Keen.CohortBuilder.generateDateMatrix('weeks', 5);
    var queryMatrix = Keen.CohortBuilder.generateCohortQueryMatrix(dateMatrix, function(cohort){
      return new Keen.Query('funnel', {
        steps: [
          {
            event_collection: 'first_launch',
            actor_property: 'dpid',
            filters: [
              { property_name: 'make', operator: 'eq', property_value: 'Apple' }
            ],
            timeframe: cohort.created_at
          },
          {
            event_collection: 'application_opened',
            actor_property: 'dpid',
            filters: [
              { property_name: 'make', operator: 'eq', property_value: 'Apple' }
            ],
            timeframe: cohort.current_interval
          }
        ]
      });
    });

    // Start first chart spinner
    cohortChart.prepare();
    Keen.CohortBuilder.fetchCohortDatasets(keenClient, queryMatrix, function(dataset) {
      cohortChart
        .data(dataset)
        .height(280)
        .render();

      cohortTable
        .data(dataset)
        .render();
    });
  </script>
</body>
</html>

More Repositories

1

dashboards

Responsive dashboard templates πŸ“Šβœ¨
HTML
11,022
star
2

explorer

Data Explorer by Keen - point-and-click interface for analyzing and visualizing event data.
TypeScript
746
star
3

keen-js

https://keen.io/ JavaScript SDKs. Track users and visualise the results. Demo http://keen.github.io/keen-dataviz.js/
580
star
4

common-web

Turn web user activity into a analyzable stream of JSON event data
JavaScript
493
star
5

pingpong

HTTP monitoring for developers. Richer analytics, greater flexibility.
CSS
334
star
6

keen-tracking.js

A light, fast and flexible javascript tracking library
JavaScript
254
star
7

keen-dataviz.js

Data Visualization Charting Library
JavaScript
222
star
8

keen-cli

A command line interface for Keen IO
Ruby
53
star
9

data-modeling-guide

Data Modeling Guide
53
star
10

github-analytics

GitHub Analytics with Keen IO
JavaScript
43
star
11

keen-analysis.js

A light JavaScript client for Keen
JavaScript
39
star
12

dashboards-dot-community

This is a collaborative project to help community managers be better at recording the impact of their activities and communicating the results.
27
star
13

keen-botkit

Analytics for Botkit by Keen IO
JavaScript
26
star
14

radialflows

Radial flow (sunburst) data visualization
Ruby
26
star
15

keen-arduino

A SDK to send events to Keen IO from an Arduino Yun
C++
15
star
16

open-data-collectors

A set of Pushpop jobs that collect data for anyone to use
Ruby
15
star
17

dashboard-builder

An easy to use JavaScript dashboard builder for event tracking
JavaScript
15
star
18

community-team

a little bit about us
14
star
19

dashboard-starter-sinatra

Sinatra template app for creating a Keen IO dashboard
JavaScript
13
star
20

community-code-of-conduct

Keen IO Community Code of Conduct
13
star
21

keen-css

Keen IO CSS Framework
CSS
13
star
22

keen

Mono-repository for Front-End projects
TypeScript
12
star
23

keen-gem-example

A Sinatra app that uses the keen gem to publish events asynchronously
Ruby
10
star
24

slate_algolia

Easily index your Slate-powered docs in Algolia
Ruby
10
star
25

dashboard-creator

TypeScript
8
star
26

keen.github.io

A collection of tools for building on Keen
CSS
7
star
27

keen-react-charts

A React Component for Keen-Dataviz.js
JavaScript
6
star
28

ecommerce-analytics-guide

Keen IO E-Commerce Analytics Guide
HTML
6
star
29

learn

Event Data Class by Keen IO
JavaScript
6
star
30

theme-builder

A custom CSS theme builder for Keen-Dataviz.js
JavaScript
5
star
31

community_ideas

A hub for tracking all of the things we want to build for the community
5
star
32

keen-cc3200

An SDK to send events to Keen IO from a Ti cc3200 board.
C
5
star
33

discoveries-demo

JavaScript
4
star
34

net-keenio-perl

A Perl library for the Keen IO analytics API (under construction)
Perl
4
star
35

keen-play-error-reporter

Sentry exception reporter for play-based apps.
Scala
4
star
36

keen-core.js

Core functionality powering keen-tracking.js and keen-analysis.js; not intended for direct use.
JavaScript
3
star
37

devise_keen

Track user events in the devise gem with Keen IO.
Ruby
3
star
38

discovery-manager.js

JavaScript
3
star
39

amp

Keen-AMP integration
HTML
3
star
40

keen-dataviz-webpack-boilerplate

JavaScript
2
star
41

analytics-in-sixty-seconds

Fastest client.draw in the West
HTML
2
star
42

comapp

JavaScript
1
star
43

react-dashboards

JavaScript
1
star
44

keen-tracking-adwords-example

JavaScript
1
star
45

keen-dataviz-maps

1
star
46

keen-ez-etl

A tiny script for exporting events from one project, modifying them, and loading them into another
Ruby
1
star