webpagelogger

1.1.4 • Public • Published

Webpagelogger

NPM module for your websites what logs the visit of webpages to your API logger. It sends per POST all possible info what can be gathered from JavaScript including the unique JavaScript fingerprint to your API. The content data is sent asynchronous via POST in a JSON format.

Demo: https://webpagelogger.calantas.org

#Usage:

Add a script import tag to your project:

<script src="node_modules/webpagelogger/dist/webpagelogger.js"></script>

Add the below to your code declaration:

example:

window.onload = async function () {
 let wpl = new Webpagelogger({
     "log_api": "http://couchdb.foo.com/logger", // required  
	 "log_data": "json",  // json(default) or  x-www-form-urlencoded 
	 "log_method": "POST" // POST(default) or PUT(not supported yet)
	 });
 await wpl.logit();
};

Inter Used Javascript Fingerprint

Package Sidebar

Install

npm i webpagelogger

Weekly Downloads

0

Version

1.1.4

License

GPL-3.0-or-later

Unpacked Size

44.6 kB

Total Files

11

Last publish

Collaborators

  • veto64