How to use universal-analytics with express

2 years ago

Just place this inside the app.js

Before you call the routes middleware


var ua = require('universal-analytics');
app.use(function(req,res,next){
ua('GoogleAnaliticsUsedIdGoesHere').pageview({
dp: req.url,
dh: req.headers.host,
uip: req.headers['x-forwarded-for'] || req.connection.remoteAddress,
ua: req.headers['user-agent'],
dr: req.headers.referrer || req.headers.referer,
de: req.headers['accept-encoding'],
ul: req.headers['accept-language']
}).send();
next();
});

better-sqlite3 is truly better!

2 years ago

Shorter code and faster results!

It sure makes it easy and awesome in every way.


I just learned about better-sqlite3

2 years ago
It seems faster comparing it with the one i use right now(sqlite3)

So i will update the website again and share my experience!

Go check better-sqlite3 on npm

I updated the website

2 years ago
I created this blog today,
I don't realy know if i am going to use it but i wanted to check sqlite (how it works on nodejs and compare it with other databases).
Seems prety easy!
previous