bloglytics
A tool for quickly analysing how much time users are spending on each widget of your blog
The Basics
This package enables you to
- Track which widget was seen
- Duration for which each widget was seen along with timestamps
- Create stats which you can either consume in the flutter code directly or send to backend as JSON
To Use
- Import
bloglytics.dart
- Create a
keepEye
object which takes a list of names for widgets and the widgets themselves as input - It returns a
ListView
object which you can use in your flutter application
Analytics
The analytics tracked here are the first created timestamps of each widget, and then when they were viewed again as well as the time spent on each view with the schema
{ 'widget_name': { 'createdAt': timeStamp, 'usedWhen_howLong': [{'started':'usedFor'},{'started':'usedFor'},{'started':'usedFor'} ... ] }
To get the analytics, in the dispose()
function of the parent widget, call
keepEyeInstance.snapshot.encodeStatstoJSON()
which returns a serialised JSON string, orkeepEyeInstance.snapshot.getStats()
which will return a Map object