Skip to content
This repository has been archived by the owner on Sep 13, 2023. It is now read-only.
/ ngx-fullstory Public archive

An Angular wrapper for the FullStory JavaScript SDK

Notifications You must be signed in to change notification settings

marcobaldo/ngx-fullstory

Repository files navigation

Deprecated

This repository is considered deprecated and will be archived.

FullStory has released an official browser SDK - @fullstory/browser, which you can find here.

Introduction

This is an Angular wrapper for the Full.Story JavaScript SDK.

Initial version of code is originally from https://github.com/CaliStyle/ng-fullstory, modified just to get something up and running that can identify my users. The old library seems to not be working anymore.

I will continuously update the library and might introduce breaking changes in the next version.

Usage

  1. Install via npm

    npm install --save ngx-fullstory
  2. Import FullstoryModule

    import { FullstoryModule } from 'ngx-fullstory';
    
    @NgModule({
      imports: [
        ...
        FullstoryModule.forRoot({
          fsOrg: <your_fs_org>, // from your Fullstory config
        })
        ...
      ]
    })
    export class AppModule { }
  3. Use in your component

    import { Component, OnInit } from '@angular/core';
    import { Fullstory } from 'ngx-fullstory';
    
    @Component({
     selector: 'app',
     template: `...`
    })
    export class AppComponent implements OnInit, OnDestroy {
     constructor(
     public fullstory: Fullstory
     ){}
    
     ngOnInit() {
       this.fullstory.login(<user id>, {
                            displayName: <user display name>,
                            email: <user email>,
                            other: <properties>
                            });
     }
    
     ngOnDestroy() {
       this.fullstory.logout();
     }
    }

    For developers of this package

    If you want to publish a new version of this package, bump up the version in

    • package.json
    • package-lock.json
    • projects/ngx-fullstory/package.json

    and then run npm run publish-lib.

About

An Angular wrapper for the FullStory JavaScript SDK

Topics

Resources

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published