jellystat documentation
This page covers the essentials for using jellystat.
If you need any help, please reach out to
contact@jellyst.at.
10 second setup
If you just want to get running, paste this in your html files, right before the
</head>
tag.
<script src='https://jellyst.at/static/embed.js'></script><script>jellystat_init("API_KEY");</script>
Replace
API_KEY
with the API key for the domain you wish to track (you can find it in that domain's settings). Keep the quotes!
You're all set. If you want to understand jellystat in more depth, keep reading.
Full setup
You can either fetch the JavaScript code from the jellyst.at server, or copy it entirely in your source files.
Fetching it from our server means you won't have to update your code if we add any features.
Copying it entirely in your source files will save a network request and make your website a tiny bit faster.
Fetch from jellyst.at
Copy this snipped in your html files, preferrably in the head section.
<script src='https://jellyst.at/static/embed.js'></script>
Copying entire source
const e="https://jellyst.at/new-event";var n=null;function t(e){n=e,a("page_load")}function a(){if(null==n)return;window.location.pathname,document.referrer,(new Date).getTimezoneOffset(),navigator.language,window.screen.availWidth,window.screen.availHeight,navigator.userAgent;var t=new XMLHttpRequest;t.onreadystatechange=()=>{},t.open("POST",e,!0),t.setRequestHeader("Content-Type","application/json"),t.send(JSON.stringify(json))}
Registering your API key
After you've done one of the above, your page is ready to report a pageload to the jellystat server.
To do so, call the
jellystat_init
function, passing it your API key.
<script>jellystat_init("API_KEY");</script>
The API key between the quotes must match the key in the SETTINGS tab for the domain you wish to track.
By including the tracking snippet above, every page load will be recorded as an event.
Do not include it more than once! Or you will see duplicate events.
Events
To track any additional event, you can just call the following javascript function from anywhere on your page:
jellystat_event('clickedbutton');
This enables you to track things beyond simple page loads: for instance whether buttons were clicked, certain sections of the page reached, etc.
You can naturally generate event names however you like:
jellystat_event(`clicked ${button_color} button`);
All events recorded on your domain show up in the EVENTS tab for it.
Note that if some of your users use tracker blockers, events for those users may not show up.
Events have a variety of properties that are automatically captured by jellystat.
Those properties let you understand more about your audience and how they use your product.
Dashboard
The DASHBOARD tab for a domain is likely where you will spend most of your time.
Its customizable nature lets you display the data that makes the most sense to you, per domain.
A TOP TABLE shows you the top values for a given event property.
A LINECHART shows you how a given property has changed over time.
A TIME PLOT shows you how events have occurred through time.
A FUNNEL shows you what proportion of sessions have met certain criteria.
Sessions
upcoming feature
Sessions can be turned on or off from a domain's SETTINGS tab.
Turning on Sessions means that events related to a single continuous usage of your domain will be grouped.
This is done by setting a cookie on the user's computer.
By default, Sessions are turned off. No cookies are set, and no correlation between individual events can be done without additional post processing.
This is the choice that most respects users' privacy, but may also prevent you from identifying issues with your product and finding ways to improve it.
If you choose to enable Sessions, we recommend that you disclose to your users what events you track, and how that data is used.
Note that depending on your jurisdiction, you may be responsible for disclosing certain things, such as cookie usage, to your users.