The easiest way to create stats is directly in your code. You just add a line of code with the new stat name. When StatHat receives the first data point, it will create the stat for you. We have libraries for a lot of languages to make it easy.

StatHat stats come in two flavors: counter and value. Counter stats are summed up over time. Value stats are averaged over time.

An example of a counter stat would be user created. Every time a user is created, you would send StatHat a count of 1. Then you could see how many users were created over the past hour, day, week, month, year.

An example value stat is sign in - age of user. Any time someone signs in, you would send StatHat their age. Looking at this stat would show you the average age of your active users and how it varies with time.

The code is a bit different depending on if the stat is a counter or value, so select the stat type for your stat first:

Select a language:

Install the gem:

gem install stathat

Copy and paste this code into your application:

StatHat::API.ez_post_count('user created', 'YOUR_EZKEY', 1)

Change the stat name to whatever you want.

StatHat will create a new stat for you when it receives the first data point. You'll get an email when that happens.

The Help area of StatHat contains documents describing the API in detail, as well as more examples, FAQs, and details for each language StatHat supports.


© 2011-2017 Numerotron Inc