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

@equinor/fusion-framework-module-analytics

v3.1.7

Published

Fusion module for collecting and exporting application analytics using OpenTelemetry standards

Readme

@equinor/fusion-framework-module-analytics

Fusion Framework module for collecting and exporting application analytics using OpenTelemetry standards.

Who should use this

  • Application and portal developers who want to track user interactions (clicks, context changes, app usage) without wiring up telemetry by hand.
  • Module authors who want their module's lifecycle events picked up by analytics automatically via a collector.
  • Test authors who need to assert which analytics events an app or collector produced.

Overview

The analytics module provides a pluggable adapter/collector architecture:

  • Collectors observe application state (context changes, app selection, app loads) and emit structured AnalyticsEvent objects.
  • Adapters receive those events and forward them to a backend — the browser console for debugging, or an OTLP-compatible endpoint for production.

When a collector emits an event it is delivered to every registered adapter.

Entry points

| Import path | Contents | |---|---| | @equinor/fusion-framework-module-analytics | Module definition, enableAnalytics, core types | | @equinor/fusion-framework-module-analytics/adapters | ConsoleAnalyticsAdapter, FusionAnalyticsAdapter, IAnalyticsAdapter | | @equinor/fusion-framework-module-analytics/collectors | ContextSelectedCollector, AppSelectedCollector, AppLoadedCollector, IAnalyticsCollector | | @equinor/fusion-framework-module-analytics/logExporters | OTLPLogExporter, FusionOTLPLogExporter | | @equinor/fusion-framework-module-analytics/mock | MockAnalyticsAdapter — record tracked events for test assertions |

Documentation

| Topic | Description | |---|---| | Adapters | ConsoleAnalyticsAdapter, FusionAnalyticsAdapter, and creating a custom IAnalyticsAdapter | | Collectors | Built-in collectors (context/app selection, app loaded) and creating a custom IAnalyticsCollector | | Tracking Events Manually | provider.trackAnalytic / trackAnalytic$ for ad-hoc event tracking | | Testing | MockAnalyticsAdapter, recording and awaiting tracked events, and using a bespoke ModulesConfigurator in tests | | Test analytics locally | End-to-end: the dev portal sends analytics to ffc mock-server, which records them, answers the app-feature events query, and lets Playwright check them with createMockAnalytics |

Quick Start

Call enableAnalytics inside your application or portal configuration callback to register adapters and collectors:

import { enableAnalytics } from '@equinor/fusion-framework-module-analytics';
import { ConsoleAnalyticsAdapter } from '@equinor/fusion-framework-module-analytics/adapters';
import { ContextSelectedCollector } from '@equinor/fusion-framework-module-analytics/collectors';

const configure = (configurator) => {
  enableAnalytics(configurator, (builder) => {
    // Register an adapter — receives every event
    builder.setAdapter('console', async () => new ConsoleAnalyticsAdapter());

    // Register a collector — emits events on context change
    builder.setCollector('context-selected', async (args) => {
      const contextProvider = await args.requireInstance('context');
      const appProvider = await args.requireInstance('app');
      return new ContextSelectedCollector(contextProvider, appProvider);
    });
  });
};

Note: The analytics module initialises automatically when used inside the Fusion Framework module system. Manual initialisation is only required when accessing the provider directly.

See Adapters, Collectors, and Tracking Events Manually for the full adapter/collector reference and how to build your own.