Skip to content

bachors/Visitor-Parser-JS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Lightweight javascript-based to analyze visitors with user-agent & ip geo location parser.

Usage

Default:

visitorParser(function(data) {
    console.log(data);
});

With Configuration:

var config = {
    // set user-agent string
    setUa: 'Mozilla/5.0 (Linux; U; Android 2.3.5; de-de; SAMSUNG GT-S5830/S5830BUKS2 Build/GINGERBREAD) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1', 
    // get all options result of regex
    getOpt: true, 
    // set url ip geo location apis
    geoAPI: 'http://freegeoip.net/json/' 
};
visitorParser(config, function(data) {
    console.log(data);
});

Contribute

  • Fork and clone this repository
  • Make some changes as required

Hope will usefull for you all.

Question ? please email : bachor.can@gmail.com