web-analyst
v3.5.2
Published
Web Analyst is a simple back-end tracking system to measure your web app performance.
Downloads
261
Maintainers
Readme
Web-Analyst
Web Analyst is a plugin for Genserve.
1. Installation
npm install web-analyst
2. Notes
- v3 works with Genserve v5 (Recommended)
- v2 works with Genserve (https://www.npmjs.com/package/genserve)
- v1 works with Express but is not maintained
3. Usage
Install Genserve
$> npm install genserve -g
Install Web-analyst
$> npm install web-analyst
Create a genserve config file and add a plugin section
{
"plugins": [
{
"name": "web-analyst",
"modulename": "web-analyst@latest",
"pages": [
".*\\.html\\b",
"\\/$"
],
"earnings": [
"\\?p=(.*)"
],
"ignore": [
"something.html"
],
"users": {
"admin": {
"password": "admin"
},
"[email protected]": {
"password": "secret"
}
}
}
]
}
All values are optional apart from the name
- name : Plugin name (required)
- modulename : Plugin version to install
- pages : Regex list for defining which pages need to be taken into account in the statistics
- earning : Pattern to identify earnings
- ignore : Pattern to identify pages to ignore
- users : Users allowed to the statistic area. Default => user:admin password:admin
- credentials: Path to a .cjs file containing allowed user list .i.e "/path/to/credentials.cjs" (The above field has precedence over this one)
Content Example for "credentials.cjs"
module.exports = {
"admin": {
"password": "admin"
}
};