npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@mapp-intelligence/node

v1.0.0

Published

Mapp Intelligence - Server-side NodeJS tracking library

Readme

Mapp Intelligence - Server-side NodeJS tracking library

Site | Docs | Support | Changelog

Server-side tracking is crucial for companies needing to measure mission-critical information on their website, such as order information or other website goals.

The NodeJS library of Mapp Intelligence helps customers to setup server-side tracking when using Mapp Intelligence as their analysis tool.

The basis for the data collection on your server is implementing the respective library. The Mapp Intelligence tracking library provides scripts to track user behavior and technical information, such as user agents, among others. In addition to the standard data collection, the tracking library offers many options to customize tracking based on specific use cases. Typical use cases are product, order and shipment tracking or the tracking of application processes.

Usage

Requires Node.js 18 or newer. See the documentation in this repository for classes, configuration, data objects, consumers and the cron job, and the changelog for the upgrade notes.

Create one tracking instance per request and close it at the end:

const http = require('http');
const {MappIntelligenceConfig, MappIntelligenceTracking, MappIntelligenceDataMap, MappIntelligencePage} = require('@mapp-intelligence/node');

http.createServer(async (request, response) => {
    const mappIntelligence = new MappIntelligenceTracking(new MappIntelligenceConfig('111111111111111', 'analytics01.wt-eu02.net')
        .setRequestURL('https://' + request.headers['host'] + request.url)
        .setUserAgent(request.headers['user-agent'])
        .setRemoteAddress(request.socket.remoteAddress));
    try {
        await mappIntelligence.track(new MappIntelligenceDataMap().page(new MappIntelligencePage('en.home')));
    } finally {
        await mappIntelligence.close();
    }

    response.end('...');
}).listen(8080);

Development

Requirements

| Software | Version | |------------------|------------:| | docker | 19.0+ | | docker-compose | 1.24+ | | make | |

Without docker: Node.js ^20.19, ^22.13 or >=24 (required by ESLint 10 for development only; the library itself supports Node.js 18+), npm install.

Build

Build, lint and release the package with Node.js 24 inside a docker container. make build only builds the package; make release runs lint, test, build and the smoke test of the build.

$ make build      # dist/ and types/
$ make release    # lint, test, build, smoke test of the build, .release/
$ make lint

Test

The tests run without network access to the Mapp track server: the HTTP and cURL tests use a local HTTPS server with a certificate of a test CA (test/resources/certs, test only).

$ make test             # Node.js 24, or "make test v=20"
$ make test-node18      # one Node.js version: test-node18, test-node20, test-node22, test-node24
$ make test-all         # Node.js 18, 20, 22 and 24
$ make test-latest      # the newest Node.js release
$ make stress-test      # FILE consumer: several processes and a concurrent cron job (local Node.js)

Without docker: npm test, npm run lint, npm run build && npm run test:dist.

Documentation

The documentation in docs/nodejs-library is a Markdown copy of docs.mapp.com.

$ make docs-sync        # downloads the pages listed in docs/docs.txt into docs/nodejs-library

make docs-sync overwrites docs/nodejs-library with the published state: changes made here that are not published yet are lost. Commit or copy them first.

Demo

Start a demo shop example on https://sgu.pixel-test.com (ports 80 and 443, add the host name to your /etc/hosts). The shop uses the library of this repository - run npm run build first.

# start a demo shop example
$ make shop

# ssh access to the demo shop
$ make shop-ssh

# ssh access to the log files of the demo shop
$ make shop-log

# example for cronjob calls
$ make shop-cron-fail
$ make shop-cron-success