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

oculr-ngx

v8.0.0

Published

An analytics library that makes collecting data in an Angular app simple.

Downloads

106

Readme

oculr-ngx

An analytics library that makes collecting data in an Angular app simple.

build workflow publish workflow

What does it do?

Oculr is an Angular library that helps you capture analytic events occurring in your app. The following features give you insight into what your users are doing in your app and how your app is handling data and errors in the background.

How can it help?

Oculr helps you know what you don't know.

Are your users finding the content you want them to? Are they getting stuck on a page or question? Is your app making redundant calls to an API? Is a feature not working leading to a subpar experience? These are just some of the questions Oculr can help answer.

Where does the data go?

Where you want it.

Oculr can point to any destination that you want to use for tracking analytic data. By default it comes with a couple preconfigured options for HTTP APIs and the console. Oculr also features the ability to shape the data based on your needs before being sent to an API.

Quick start

Install Oculr.

npm install oculr-ngx --save

Import Oculr to your app's Angular AppModule.

import { OculrAngularModule } from 'oculr-ngx';

@NgModule({
  imports: [OculrAngularModule.forRoot()],
})
export class AppModule {}

Configure Oculr during app initialization in AppModule.

import { ConfigurationService, Destinations } from 'oculr-ngx';

@NgModule({
  providers: [
    {
      provide: APP_INITIALIZER,
      useFactory: initializeAppFactory,
      deps: [ConfigurationService],
      multi: true,
    },
  ],
})
export class AppModule {}

function initializeAppFactory(oculrConfigService: ConfigurationService): () => Observable<boolean> {
  oculrConfigService.loadAppConfig({
    logHttpTraffic: true,
    destinations: [
      {
        name: Destinations.Console,
        sendCustomEvents: false,
      },
    ],
  });
  return () => of(true);
}

Then add the oculrClick directive to any button in your app.

<button id="continue" oculrClick>Continue</button>

Run your app and you will see an analytic event get logged to your console when clicking the button.

Now that it's working you will likely want it to do more then log a single click to your console. Please check out our Full API for more hands-on details to get the most out of Oculr.

Documentation

Updates

Contributing

Want to help?

We're excited about your interest in the project. Have an idea, want to contribute some code, found a bug, expand some documentation? Awesome! Check out our contribution guide and then take a look at our issues and discussions. We recommend issues that have been labeled as help wanted or good first issue.

Local setup

Local setup and a quick few steps.

git clone https://github.com/progressive-insurance/oculr-ngx
cd oculr-ngx
npm install
npm run test

We recommend the following extensions to make the contribution process as seamless as possible.

Code of conduct

Help us make this project open and inclusive. Please follow our Code of Conduct.