meteor-iron-router-ga icon indicating copy to clipboard operation
meteor-iron-router-ga copied to clipboard

Server side route tracking

Open perak opened this issue 10 years ago • 6 comments

Hi Sean,

Is that possible to track server side routes?

Thank you!

perak avatar Jul 19 '14 06:07 perak

Hi. I don't believe Google Analytics provides a way to do this. If you know different, I'd be interested to hear about it.

reywood avatar Jul 22 '14 16:07 reywood

OK. Thank you for your answer.

perak avatar Jul 22 '14 18:07 perak

Maybe "node-ga" module can help - I made simple node server and it works (I'l try that later in meteor)

var http = require("http");
var ga = require("node-ga")('UA-XXXXXXXX-X', { safe: true});

var server = http.createServer(function(req, res) {
    return ga(req, res, function () {

        res.writeHead(200, {"Content-type": "text/html"});
        res.end("<h1>Hello world!</h1>\n");
    });
}).listen(80);

perak avatar Jul 22 '14 18:07 perak

@perak Hi! Did you realize it in Meteor? )

meule avatar Dec 19 '14 08:12 meule

Hi,

No, I didn't - but I even didn't try - I am counting number of downloads by incrementing collection field - without ggogle analytics

On Fri, Dec 19, 2014 at 9:43 AM, Konstantin Varik [email protected] wrote:

@perak https://github.com/perak Hi! Did you realize it in Meteor? )

— Reply to this email directly or view it on GitHub https://github.com/reywood/meteor-iron-router-ga/issues/4#issuecomment-67611838 .

perak avatar Dec 19 '14 15:12 perak

Hi,

I needed some server side analytics as well and seems that this could be achieved with universal-analytics npm package (https://www.npmjs.com/package/universal-analytics). I made a initial integration in https://github.com/erkkaha/meteor-iron-router-ga If pull requests on this are welcome I could propably extend this a bit and make one.

erkkaha avatar Feb 08 '15 09:02 erkkaha