Closed
Bug 749604
Opened 13 years ago
Closed 13 years ago
Create analytics module to gather and send front-end and user analytics data
Categories
(Pancake Graveyard :: Front-end, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
M3
People
(Reporter: sfoster, Assigned: sfoster)
References
Details
We need a simple mechanism to gather analytics data that is only available in the front-end, and have that sent back to the server.
It should buffer or queue up requests so we don't have one request per data-point which would likely perform horribly.
Assignee | ||
Comment 1•13 years ago
|
||
I've made a start on this in the frontend-analytics branch.
I'm porting the dojox.analytics module from Dojo which I've used before and does all this.
So far I've got the core functionality which queues up data and periodically flushes to the server. There's a few plugins for gathering specific analytics stuff that I might also port - like an idle/active plugin, window/client plugin etc.
Assignee | ||
Comment 2•13 years ago
|
||
modules and tests written and the loadtime functionality wired into main-bb in: https://bitbucket.org/mozillapancake/pancake/changeset/4ad0ed40306f
..that gathers load-time data and ends up making a request to /api/analytics with body like:
{"id":1,"data":[{"loadtime.start":1335974050202,"loadtime.end":1335974064633,"loadtime.elapsed":14431}],"csrf_token":"0ad1b3453d3d936f3adb9a2437cbb4f6705583df"}
Not sure where the data should ultimately be sent, but this looks complete as far as the front-end goes. Holding off merging into default until there's an endpoint to receive it.
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 3•13 years ago
|
||
I merged this to default and closed the frontend-analytics branch. When /main finishes loading and initialization, a POST to config.analyticsUrl is made with the loadtime analytics data.
Comment 4•13 years ago
|
||
Please send data in the format below to: /lattice/stats
[
{
"js.loadtime": {
"timestamp": 1339639106845,
"elapsed" : 1590
}
},
...,
{..}
]
There will be a whitelist for allowed 'buckets'.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Comment 5•13 years ago
|
||
{'data': [
...
]}
Might be better actually
Comment 6•13 years ago
|
||
API implemented.
Sample curl command:
curl -v -X POST -d '{"data":[{"js.loadtime":{"timestamp": 1339639106845, "elapsed":1590}}]}' 'http://localhost:6543/lattice/stats'
Assignee | ||
Comment 7•13 years ago
|
||
Status: REOPENED → RESOLVED
Closed: 13 years ago → 13 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•