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

@antelopejs/interface-dms-marketing

v0.6.1

Published

AntelopeJS interface for the DMS marketing module: read aggregated first-party analytics from any module

Readme

@antelopejs/interface-dms-marketing

The AntelopeJS interface to read aggregated first-party analytics of the DMS marketing module from any module, and to ship marketing content as code.

What it does

  • Reads the click heatmap of one page path across a tenant's websites, aggregated on the implementer's grid (GetClickHeatmap).
  • Returns normalized points with the clicked element's anchor, so an overlay stays stable across window sizes.
  • Lets you show marketing data to tenant users on your own pages, since every /modules/ page of the DMS is reserved to the platform owner.
  • Declares websites and funnels with their A/B splits from code (EnsureWebsite, EnsureFunnel). A declaration writes once per id, and a record that already exists is left as it is.
  • Declares page snapshots, the backdrops of the heatmaps, for pages the tracker cannot capture (EnsurePageSnapshot).
  • Imports historical analytics through the live collection pipeline, once per import id (ImportAnalytics), for a demo instance or a move from another tool.
  • Keeps your module independent of the implementation, @antelopejs/dms-marketing.

Install

Add the interface as an optional dependency of the module that reads analytics. A call made before a module implements the interface waits for one, and a storage failure rejects, so catch the rejection where analytics are optional.

pnpm add --save-optional @antelopejs/interface-dms-marketing

Quick start

import { GetClickHeatmap } from "@antelopejs/interface-dms-marketing";

export async function pricingHeatmap(tenantId: string) {
  try {
    return await GetClickHeatmap({ tenantId, path: "/pricing" });
  } catch {
    return null;
  }
}

Without from and to, the heatmap covers the last 7 days. Pass an authenticated tenant id only.

Declare content from a Hook.TENANT_BEING_PROVISIONED handler. The DMS fires it once per tenant, when the tenant is created, the default tenant included. All four content functions require tenantId, and a missing or blank value, or one with surrounding whitespace, rejects. The marketing module neither provisions nor authorizes tenants.

import { Hook, RegisterHook } from "@antelopejs/interface-dms/hooks";
import { EnsureFunnel, EnsureWebsite } from "@antelopejs/interface-dms-marketing";

async function writeShopContent(tenantId: string) {
  await EnsureWebsite({ tenantId, id: "shop", name: "Shop", domain: "shop.example.com" });
  await EnsureFunnel({
    tenantId,
    id: "shop-checkout",
    websiteId: "shop",
    name: "Checkout",
    steps: [
      { kind: "url", value: "/cart" },
      { kind: "custom", value: "order_placed" },
    ],
  });
}

export function construct() {
  RegisterHook(Hook.TENANT_BEING_PROVISIONED, async ({ tenantId }) => {
    await writeShopContent(tenantId);
  });
}

Compatibility

A @antelopejs/dms-marketing release implements one minor line of this interface. The @antelopejs/interface-dms-marketing row of the compatibility block in the module README gives that range. Use a module release whose range covers the interface release your code imports. A module release that predates a function never implements it, and a call to that function waits forever. The interface declares this peer dependency:

| Package | Supported | Tested with | | ---------------------------- | ---------------- | ----------- | | @antelopejs/interface-core | >=0.2.4 <1.0.0 | 0.4.0 |

Documentation

Contributing

This package lives in the AntelopeJS/dms-marketing pnpm workspace, next to the module that implements it. Read CONTRIBUTING.md and the repository README for the development commands. Release this package before the module that implements it.

License

Apache-2.0