Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including visitor-tracking with all npm packages installed. Try it out:

var visitorTracking = require("visitor-tracking")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

visitor-tracking v0.0.1

Track the users view your webpage, generate visit logs.


A simple visitor tracking application powered by node.js.

Configuration and installation

Change the port and log location in the file

exports.config = 
    port: 3002
    location: "./log.txt"

Install the depended modules:

sudo npm install -d

Start the application:

npm start

Stop the application:

forever stopall

Add more configuration into Nginx:

# including in server block
location /_/ {
  proxy_pass      http://tracking_app/;
  proxy_redirect off;

# outside of server block
upstream tracking_app {

Embe the JavaScript tracking code on your webpages:

<script type="text/javascript" src="/_/_.js"></script>
RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free