How to use 'session' to check path history of user I want to keep a track of the pages user visited, I got to know i can do this with the help of session and hook_node_view. Being a beginner, i couldn't find any particular help on using session API, can anyone help?
if you just want to track user visiting there are some modules ready for that like user visits . 

or if you want to do something and need to write a module for that then hook_node_view will fire when user is viewing a node . you can implement it like below :

function YOURMODULENAME_node_view($node, $view_mode, $langcode)
{
   global $user; //user data is here
}


now you can do what you want with user.