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

ngx-vectranalytics-client

v1.1.16

Published

To install and use the client in any existing projects, do the following steps:

Readme

Usage

To install and use the client in any existing projects, do the following steps:

  1. Install the Analytics Client via npm:
npm install ngx-vectranalytics-client
  1. Load the Analytics Module in your root app.module.ts file:
@NgModule({
  declarations: [
    AppComponent,
  ],
  imports: [

    VectranalyticsClientModule.forRoot({
      appName: 'Demo',
      version: '1.0',
      environment: 'Dev',
      deviceId: 'IMEI or IP',
      serviceUrl: 'https://xxx.xxxxx.xxx/api/analytics'
    })

  ],
  providers: [],
    bootstrap: [AppComponent]
})
export class AppModule { }
  1. Use the AnalyticsService service wherever needed, this will be made available via dependency injection:
constructor(private analytics: AnalyticsService) { }
  1. On logon, set the identity. There is an AnalyticsIdentityBase interface that can be extended with custom fields. As long as the userId is used:
export interface AuthModel extends AnalyticsIdentityBase {
  // userId: string <-- field in base interface
  customfield2: string
  customfield3: string
}

await this.analytics.setIdentity(this.auth)
  1. To log an action, use the code below. A session will be created if it does not already exist.
await this.analytics.logAction({
  module: {
    moduleName: 'Module Name',
    // sectionName: 'Section Name' <-- This is optional
  },
  actionName: 'Action Name'
})
  1. To start a session manually, use the code below. If there is an open session in the module / section, it will be ended automatically. It will also be linked to the current session if open.
await this.analytics.startSession({
  moduleName: 'Module Name',
  // sectionName: 'Section Name' <-- This is optional
})
  1. To end a session, use the code below. Any child sessions linked to the session will also be ended.
await this.analytics.endSession({
  moduleName: 'Module Name',
  // sectionName: 'Section Name' <-- This is optional
})
  1. The version can be set by using the setVersion method.
await this.analytics.setVersion('1.0')
  1. The device ID can be set by using the setDeviceId method.
await this.analytics.setDeviceId('IMEI or IP')

Notes:

  1. Logging an action will automatically create a session if it does not already exist.
  2. Only 1 session will be tracked per module / section combination. If a new session is created, any existing sessions in that module / section combination will be ended automatically.
  3. If a new session is started from an existing open session, they will be linked as a parent / child session. Closing parent sessions will automatically close child sessions.