Comments (5)
It seems to be working (I'm seeing more than 1 session over time)! I also updated universal-analytics version. Going to test it out a couple of days, then will submit a PR if all looks good.
from ampm.
Interesting. Something like this in logging.js
seems like it might work.
// Log to Google Analytics.
// Restart a session every 500 events, see issue #40
this._google.eventCount = this._google.eventCount || 0;
var params = {};
if(this._google.eventCount >= 500) {
params.sessionControl = 'start';
}
this._google.event(data.Category, data.Action, data.Label, data.Value, params);
var queue = _.clone(this._google._queue);
this._google.send(_.bind(function(error) {
if (!error) {
this._google.eventCount++;
return;
}
if (error.code === 'ENOTFOUND') {
// Couldn't connect -- replace the queue and try next time.
// https://github.com/peaksandpies/universal-analytics/issues/12
this._google._queue = queue;
} else {
// Something else bad happened.
logger.warn('Error with Google Analytics', error);
}
}, this));
The version of universal-analytics
might need to be updated too... it's pretty old now.
Wanna try it out?
from ampm.
Heh, looks like I complained about this at some point myself.
peaksandpies/universal-analytics#12 (comment)
from ampm.
Haha... I was wondering why we didn't notice it before. Okay I'll try out sessionControl
and update if that works. Thanks!
from ampm.
Fixed in 1.7.8.
from ampm.
Related Issues (20)
- sending events / logs with unicode chars HOT 7
- Space in user path error? HOT 8
- Support for arbitrary commands
- Support comments in config files HOT 1
- Support for custom branding
- Debug mode
- rewrite/refactor/update
- ampm portfolio
- file name and line number for error logging HOT 4
- Screenshot support for Raspberry Pi? HOT 2
- Monitor console output of launched app HOT 1
- Have ampm serve it's own Javascript client library
- Support multiple sideCommand items. HOT 1
- Possible to update "heartbeatTimeout" from app via OSC? HOT 3
- ampm on linux? HOT 2
- Limit the rate of emails
- Bad path to server.js, in start.js. ampm never starts HOT 6
- restart app on crash HOT 1
- Java Application Monitoring HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ampm.