UNPKG

measurement-framework

Version:

Collection of Javascript code to implement a browser based measurement system for websites. It uses a cookie to store a users action on a webpage and let you map thoose actions to a particular state in the user journey.

11 lines (9 loc) 266 B
import window from "window" function listen(event, callback) { if (window.addEventListener) { window.addEventListener(event, callback) } else if (window.attachEvent) { window.attachEvent('on' + event, callback) } } export default listen