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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@eric-emg/funnel-analysis-lib

v1.1.16

Published

A comprehensive Angular library for funnel analysis dashboards with performance visualization and metrics analysis

Downloads

1,921

Readme

Funnel Analysis Library

A comprehensive Angular library for building funnel analysis dashboards with performance visualization and metrics analysis.

Installation

From NPM (once published)

npm install funnel-analysis-lib

Local Development (from this workspace)

# Build the library
npm run build:lib:prod

# The library will be available at dist/funnel-analysis-lib

Usage

Import Components

import { DashboardComponent } from 'funnel-analysis-lib';
import { CommonModule } from '@angular/common';

@Component({
  selector: 'app-root',
  standalone: true,
  imports: [CommonModule, DashboardComponent],
  template: `
    <lib-dashboard [data]="performanceData"></lib-dashboard>
  `
})
export class AppComponent {
  performanceData = { /* your performance data */ };
}

Import Models and Interfaces

import { 
  PerformanceOverviewStructuredV3Interface,
  GradeEnum,
  MetricStatusEnum 
} from 'funnel-analysis-lib';

const assessment: PerformanceOverviewStructuredV3Interface = {
  // your data structure
};

Import Services

import { ModalService, FunnelOrderService } from 'funnel-analysis-lib';

@Injectable()
export class MyService {
  constructor(
    private modalService: ModalService,
    private funnelOrderService: FunnelOrderService
  ) {}
}

Features

  • Dashboard Component: Main visualization component for funnel analysis
  • Metric Cards: Individual metric display components
  • Insight Cards: Actionable insights from funnel data
  • Breakdown Sections: Detailed breakdowns by various dimensions (device, channel, etc.)
  • Overall Assessment: Summary assessment of funnel health
  • Modal Management: Built-in modal service for notifications and dialogs
  • Funnel Ordering: Service for organizing and prioritizing funnel items

Styling

The library uses Tailwind CSS for all styling. To use this library in your project, follow these steps:

Step 1: Install Tailwind CSS (if not already installed)

npm install -D tailwindcss postcss autoprefixer
npx tailwindcss init -p

Step 2: Configure Tailwind to scan the library files

IMPORTANT: Update your tailwind.config.js to include the library's compiled files:

/** @type {import('tailwindcss').Config} */
module.exports = {
  content: [
    "./src/**/*.{html,ts}",
    "./node_modules/@eric-emg/funnel-analysis-lib/**/*.{js,mjs}",  // ← ADD THIS LINE
  ],
  theme: {
    extend: {},
  },
  plugins: [],
}

Note: The path ./node_modules/@eric-emg/funnel-analysis-lib/**/*.{js,mjs} tells Tailwind to scan the compiled library files for class names.

Step 3: Import Tailwind CSS in your global styles

/* In your global styles.css or main.css */
@tailwind base;
@tailwind components;
@tailwind utilities;

Custom Colors

If you want to use the library's custom color palette, add to your tailwind.config.js:

theme: {
  extend: {
    colors: {
      'symphiq-blue': '#1a56db',
      'symphiq-dark': '#0f172a',
      'symphiq-gray': '#64748b',
    },
  },
}

Building the Library

# Build for production
npm run build:lib:prod

# Build for development
npm run build:lib

# Build everything (library + demo)
npm run build:all

Testing

# Run library tests
ng test funnel-analysis-lib

# Run library tests with watch mode
ng test funnel-analysis-lib --watch

Development

To develop and test the library:

  1. Start the demo application which imports the library:
npm start
  1. The demo app will hot-reload when you make changes to both the library and demo app

Publishing to NPM

  1. Update the version in projects/funnel-analysis-lib/package.json
  2. Build the library:
npm run build:lib:prod
  1. Publish from the dist folder:
cd dist/funnel-analysis-lib
npm publish

License

MIT