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

@bloomscorp/ngx-bloomsight

v1.4.22

Published

A client side angular library to work with bloomsight.io

Downloads

11

Readme

ngx-bloomsight

A client side angular library to work with bloomsight.io

Badges

 License

Installation

Install using npm by running

npm install @bloomscorp/ngx-bloomsight

Usage/Examples

Configuration

Use the app.module.ts to configure the library.

import {NgxBloomsightModule} from '@bloomscorp/ngx-bloomsight';

@NgModule({
    declarations: [AppComponent],
    imports: [
        BrowserModule,
        AppRoutingModule,
        NgxBloomsightModule.forRoot({
            propertyToken: '65143f755c403e030c222340',
            isDevelopmentMode: true,
            stopAll: false,
            ...
        }),
    ],
    providers: [],
    bootstrap: [AppComponent]
})
export class AppModule { }

Below is the table with all the possible options that can be configured.

| Option | Type | Description | Mandatory | Default | |:-----------------------|:----------|:--------------------------------------------------------------------------------------------------------------------------------------------|:----------|:--------| | propertyToken | string | bloomsight.io property token | ✅ | NA | | isDevelopmentMode | boolean | if true, then logs data in the browser console | ✅ | NA | | observePageViaWebAPI | boolean | if true, will detect page view event based on web APIs. However, if false, pageViewObserver should be used to trigger page view event | ❌ | true | | stopSimpleEvent | boolean | stops only simple event tracking | ❌ | false | | stopDataEvent | boolean | stops only data event tracking | ❌ | false | | stopPageViewEvent | boolean | stops only page view event tracking | ❌ | false | | stopAll | boolean | stops all event tracking | ❌ | false | | logOnly | boolean | tracks event but doesn't save to database. Should be used only when isDevelopmentMode: true | ❌ | false |

Page View Event

To tracking website visits for your angular application just initialize BloomsightEventService service in app.component.ts.

import {BloomsightEventService} from '@bloomscorp/ngx-bloomsight';

constructor(public bloomsightService: BloomsightEventService) { }

Simple Event

Use the resolveSimpleEvent method to log simple events

import {BloomsightEventService} from '@bloomscorp/ngx-bloomsight';

constructor(public bloomsightService: BloomsightEventService) { }

this.bloomsightService
    .resolveSimpleEvent('65d735b122354c8ba6a489c2', 'Contact Us CTA button');

| Option | Type | Description | Mandatory | Default | |:-------------|:---------|:-------------------|:----------|:--------| | eventToken | string | Id of simple event | ✅ | NA | | label | string | a label/name for the event for future reference | ❌ | '' |

Data Event

Use the resolveDataEvent method to log data events

import {BloomsightEventService} from '@bloomscorp/ngx-bloomsight';

constructor(public bloomsightService: BloomsightEventService) { }

this.bloomsightService.resolveDataEvent(
    '66d735b122355c8ba6a456f8', 
    {
        productId: 120,
        sku: 'PROD021298'
    },
    'Add to Wishlist CTA button'
);

| Option | Type | Description | Mandatory | Default | |:-------------|:---------|:-----------------------------------------|:----------|:--------| | eventToken | string | Id of data event | ✅ | NA | | eventData | Object | additional metadata in key, value format | ✅ | NA | | label | string | a label/name for the event for future reference | ❌ | '' |

Send Email

Use sendEmail method to send email

import {BloomsightMailService} from '@bloomscorp/ngx-bloomsight';

constructor(public bloomsightMailService: BloomsightMailService) { }

this.bloomsightMailService.sendEmail(
  '66d735b122355c8ba6a456f8', 
  '63d735h822355s6ba6a4556k',
  '61d895h922355b6ba6a4587a',
  ...
)

| Option | Type | Description | Mandatory | Default | |:------------------|:-----------|:-------------------------------------------------------------------------------------------|:----------|:--------| | engineId | string | Id of the engine that will be used to send email | ✅ | NA | | templateId | string | Id of the email template that will be used as email body | ✅ | NA | | templateOwnerId | string | Id of the user who has created the template | ✅ | NA | | emailMetaData | FormData | attachment & variables used in the template & their respective values in key, value format | ✅ | NA | | onSuccess | function | pass a function to trigger on successfully sending email | ✅ | NA | | onError | function | pass a function to trigger when an error occurs | ✅ | NA |

License

MIT

Support

Report issues or feature requests here