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

@mparticle/web-rokt-pay-plus-kit

v1.1.0

Published

mParticle web kit that re-emits the events an advertiser already logs to the embedding Rokt Pay+ plugin via postMessage.

Downloads

174

Readme

Rokt Pay+ mParticle Web Kit

An mParticle web kit that forwards the events your application already logs through the mParticle web SDK to a Rokt Pay+ placement. It lets your conversion funnel drive the placement experience through configuration, without adding placement-specific code to your application.

How it works

The kit loads alongside the mParticle web SDK and receives the events your application logs. It translates a configurable set of those events into the messages a Rokt Pay+ placement listens for, and posts them to the embedding window.

| Rokt signal | Source | | :-- | :-- | | initiated | the kit initializes (application loaded) | | stepComplete | a configured funnel-step screen is viewed | | approved | the configured conversion event | | every other Pay+ signal (pending, accountCreated, purchaseCompleted, ...) | the matching configured custom event |

Configuration

You decide which of your screens and events map to each Rokt signal through this kit's settings in the mParticle dashboard. Each setting accepts a single name or a comma-separated list of names.

Funnel progression is driven by page view events, matched on the screen name. The conversion and every other outcome are custom events, matched on the event name. A page view is never the conversion.

The screen name is read from the page view's screen_name attribute (falling back to the page name when that attribute is absent), so the names you list in progressionScreenNames are the screen_name values your application sends.

progressionScreenNames lists the screens that emit stepComplete. Each custom-event setting maps an event name to the Pay+ signal of the same name: approvedEventName maps to approved, purchaseCompletedEventName maps to purchaseCompleted, and so on. The full list of fields, each with its description, appears in the connection settings in the mParticle dashboard.

initiated is emitted automatically when the kit initializes. If no settings are provided, the kit applies a default mapping: each page view is treated as a funnel step, and a custom event named conversion is treated as the approval.

Message format

Each message posted to the embedding window has the following shape:

{ source: 'rokt-payplus-kit', type: 'approved', detail: { /* event attributes */ } }

Consumers read type to determine the signal; detail carries the originating event's attributes.

Usage

JS kits are automatically included with your mParticle.js file when you load mParticle via the snippet. To turn this integration on for your workspace and configure the settings above, contact your Rokt account team.

Development

The kit is a single TypeScript file (src/RoktPayPlus-Kit.ts) built with Vite.

Build

npm install
npm run build        # outputs dist/RoktPayPlus-Kit.{common,esm,iife}.js and RoktPayPlus-Kit.d.ts
npm run build:watch  # rebuild on change

Test

npm test             # runs the vitest suite (jsdom, no browser required)
npm run typecheck    # tsc --noEmit

License

Apache-2.0. See LICENSE.