Skip to content

Latest commit

 

History

History
29 lines (23 loc) · 1.01 KB

README.md

File metadata and controls

29 lines (23 loc) · 1.01 KB

Prints

The minimal user tracking library.

A simple, vanilla user tracking library. Supports adding hooks to any element in the DOM, which then can be exported to both PNG and JSON formats for downstream use.

To use, simply include <script src="prints.js"></script> and setup your loged events

Example

"Hello world"

Create a new prints that should POST logs to port 5000 on localhost

var points = new Prints("http://localhost:5000");

Whenever the user clicks, create circle with diameter 10 around that location. Also, log the information in a time series.

points.createNewTracker(document, "onclick", {color: "red", size: 10, shape: "circle", logEvent: true});

When the user tries to exit the page, send their interactions to a safe place.

window.onbeforeunload = function() {
  points.sendLoggedPng
  points.sendLoggedEvents
}

Selected Image

Hi using tracking library