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 🙏

© 2024 – Pkg Stats / Ryan Hefner

@useblu/blu-lytics

v1.0.11

Published

blu-lytics

Downloads

1,681

Readme

How it works

Main goals include: being the sole entry point, simplifying integration between monitoring tools, and enabling centralized sending of messages and events. These goals offer developers the following benefits:

  • Unified messages and events Allows messages and events to be propagated across all monitoring tools through a single entry point.

  • Centralized and simplified configuration (Zero config) Enables initializing tools by providing only their key or token, without the need for prior configuration, saving time and reducing code.

  • Scalability Facilitates the removal or addition of a tool, as the library contains all necessary configuration for operation. Flexibility that enhances the efficiency of monitoring tool management.

Installation

yarn add @useblu/blu-lytics

or

npm i @useblu/blu-lytics

Usage

Importing Library

Destructuring the import


import { initializeProviders } from 'blu-lytics';

Importing all functionalities


import * as blu-lytics from 'blu-lytics';

Method: initializeProviders

This method simplifies the connection to one or more monitoring tools, eliminating the need for pre-configurations. Simply provide the name of the tool to be used and its API key 'apiKey'.

To establish a connection with a single tool, it is necessary to pass an object as a parameter, containing the fields providerName, apiKey, and another object with the environment (the latter is optional, with the default value being 'production').

initializeProviders({providerName: 'track-tool-name', apiKey: 'your-api-key'}, {environment: 'development'});

To connect to more than one tool, it is necessary to pass an array (list) of objects as a parameter, maintaining the fields providerName, apiKey, and another object containing environment (optional).

initializeProviders([
    { providerName: 'track-tool-name', apiKey: 'your-api-key'},
    { providerName: 'another-track-tool-name', apiKey: 'your-api-key'}
], {environment: 'development'});

Method: sendScreenEvent

This method sends a message that will be propagated and recorded in all tools that have been previously initialized through the initializeProviders method. To use it, only a string needs to be provided as a parameter.

sendScreenEvent('page_view');

Method: sendCustomEvent

This method sends an event with a message and additional optional parameters, which will be propagated and recorded in all tools that have been previously initialized through the initializeProviders method.

To use it, two parameters need to be provided: a string to describe the event and an object containing the additional optional fields.

sendCustomEvent('your_custom_page', {
    props1: 'any-information',
    props2: true,
  });

Method: sendUserIdentification

This method sends relevant information related to user identification, such as their name, email, and ID, for example.

To use, it is possible to provide two parameters: a string representing a unique identifier and an object containing additional and optional fields.

sendUserIdentification('user-id', {
    name: 'user name',
    email: '[email protected]',
  });

Supported tracking tools

  • Sentry
  • Fullstory
  • Mixpanel

Incoming Updates

- Suport for Microsoft Clarity

Contributing

Whether you're helping us fix bugs, improve the docs, or spread the word, we'd love to have you as part of this project! Read below to learn how you can take part of it.

Code of Conduct

We adopted a Code of Conduct that we expect project participants to adhere to. Please read the full text so that you can understand what actions will and will not be tolerated.

Contributing Guide

Read our contributing guide to learn about our development process, how to propose bugfixes and improvements, and how to build and test your changes.

Release to NPM

To release a new version on NPM registry, just bump version on package.json and merge it into master to automatically publish a new version.

License

All packages are licensed under the terms of the MIT License.