“Next article” micro-analytics: Redis and Node

My last post demonstrated a micro-analytics app using Redis and Ruby/Sinatra. Here is the equivalent using Node/Express/Node Redis. var express = require(‘express’); var app = express(); var db = require(‘redis-url’).connect(process.env.REDISTOGO_URL); /** * Log navigation from one location to the next * @param {string} from: one location * @param {string} to: the next location * @returns…… Continue reading “Next article” micro-analytics: Redis and Node

“Next article” micro-analytics with Redis and Ruby

@elgrom has an interesting idea for predicting which article users are most likely to read next:Every time a user navigates between articles, log it.For each article, calculate the most popular “next” articleHere is how to do it in 12 lines of code with Redis and Ruby/Sinatra. (Next i’ll try it with Node for better scalability).require…… Continue reading “Next article” micro-analytics with Redis and Ruby