![require(esm) Backported to Node.js 20, Paving the Way for ESM-Only Packages](https://cdn.sanity.io/images/cgdhsj6q/production/be8ab80c8efa5907bc341c6fefe9aa20d239d890-1600x1097.png?w=400&fit=max&auto=format)
Security News
require(esm) Backported to Node.js 20, Paving the Way for ESM-Only Packages
require(esm) backported to Node.js 20, easing the transition to ESM-only packages and reducing complexity for developers as Node 18 nears end-of-life.
Track what a user does on a site in csv-format
See the example folder for examples of how to use condor.
var xhr = require('xhr')
, track = require('../condor')({
// default 500ms
// set for how long time scroll & resize events should be
// [debounced](https://www.npmjs.org/package/debounce)
// The `duration`-attribute is the last of these events.
debounceTime: 300
})
, noop = function () {}
track.onevent = function (csv) {
// this callback is called everytime an event happens
// the data is a line of csv, see below for information on the format of the
// csv
xhr({
method: 'POST'
, body: csv
, uri: '/track'
}, noop)
}
// this gets called by beforeunload - so anything in here must be synchronous
track.onend = function (csv) {
// this will be an end-event - meaning that the visit on the page has ended
xhr({
method: 'POST'
, body: csv
, uri: '/track'
, sync: true
}, noop)
}
The callback to '/track'
gets called everytime a trackable event occur. csv is the data about the event (see data-format for details).
Track is done in csv that corresponds to the following headers:
clientName,clientVersion,eventName,windowWidth,windowHeight,scrollX,scrollY,location,duration,referrer,path,clickX,clickY,href,target,visibility,name,trackableType,trackableValue,visitor,session
If not explicitly written out, the columns are always included (when available). For example, there's always a column describing the width of the window and if a referrer exists that's also always included in the events.
data-trackable-type
and data-trackable-value
attributes.
visible
or hidden
. Only applicable for visibility events.data-trackable-type
attribute.data-trackable-value
attributeFAQs
Track what a user does on a site in csv-format
The npm package condor receives a total of 5 weekly downloads. As such, condor popularity was classified as not popular.
We found that condor demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
require(esm) backported to Node.js 20, easing the transition to ESM-only packages and reducing complexity for developers as Node 18 nears end-of-life.
Security News
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.