I want to save the entry point of a user on my side. So here is my solution
Meteor.onConnection(function(conn) {
console.log(conn.clientAddress);
console.log(FlowRouter.getRouteName());
var id = database.insert({
page: "page",
ip: conn.clientAddress,
enterdPagedAt: new Date(),
isActive: true
});
});
as u can see, under page, i want to save the route where he entered. So how can i get the current route on the server using flow router ?
From the Meteor Guide comes a tip:
It’s common to want to know which pages of your app are most commonly visited, and where users are coming from. You can read about how to set up Flow Router based analytics in the Deployment Guide.
Even if you don't want to use a third-party analytics service, the okgrow:analytics package they refer to should have the info you need buried in its code.