0.69.0 • Published 2 days ago

@daffodil/analytics v0.69.0

Weekly downloads
-
License
MIT
Repository
github
Last release
2 days ago

@daffodil/analytics

Overview

The Daffodil Analytics Module is a lightweight Angular package that helps integrate analytics providers into your Angular applications, supporting multiple analytics services. It simplifies event tracking and provides configuration options, such as defining analyzable actions. Notably, this module focuses on handling state-related events and operates specifically on Actions from @ngrx/store, rather than browser events. Additionally, the package includes testing utilities tailored for analytics event tracking in Angular applications.

Features

Usage

In this example, MyAnalyticsService implements the DaffAnalyticsTrackerClass interface, providing a track method. Inside the track method, you can define your custom logic for tracking analytics events based on the provided action. The service returns an observable, indicating the success of the tracking operation. Replace the logic inside the track method with your actual analytics tracking implementation.

Define a tracking service

import { Injectable } from '@angular/core';
import { DaffAnalyticsTrackerClass } from '@daffodil/analytics';
import { Action } from '@ngrx/store';
import { Observable, of } from 'rxjs';

@Injectable({
  providedIn: 'root',
})
export class MyAnalyticsService implements DaffAnalyticsTrackerClass {

  track(action: Action): Observable<unknown> {
    // Your custom logic for tracking analytics events based on the provided action
    // Return an observable, for example, indicating whether the tracking was successful
    return of(true);
  }
}

Import DaffAnalyticsModule in Your Application

import { DaffAnalyticsModule } from '@daffodil/analytics';

// Import your custom analytics service(s)
import { MyAnalyticsService } from './path/to/my-analytics.service';

@NgModule({
  imports: [
    // Initialize Daffodil Analytics Module with custom analytics service(s)
    DaffAnalyticsModule.forRoot([MyAnalyticsService]),
    // ... other modules
  ],
  // ... other module metadata
})
export class YourAppModule { }
0.69.0

2 days ago

0.68.1

2 months ago

0.68.0

3 months ago

0.67.0

4 months ago

0.66.1

5 months ago

0.66.0

5 months ago

0.62.1

9 months ago

0.62.0

10 months ago

0.64.1

7 months ago

0.62.3

9 months ago

0.64.0

7 months ago

0.62.2

9 months ago

0.63.0

8 months ago

0.63.2

7 months ago

0.63.1

8 months ago

0.61.0

10 months ago

0.64.2

6 months ago

0.62.4

9 months ago

0.60.0

12 months ago

0.59.2

12 months ago

0.59.0

1 year ago

0.59.1

12 months ago

0.58.9

1 year ago

0.58.10

1 year ago

0.58.7

1 year ago

0.58.8

1 year ago

0.58.5

1 year ago

0.58.6

1 year ago

0.58.3

1 year ago

0.58.4

1 year ago

0.58.1

1 year ago

0.58.2

1 year ago

0.57.0

1 year ago

0.56.1

1 year ago

0.58.0

1 year ago

0.56.0

1 year ago

0.54.0

1 year ago

0.53.0

1 year ago

0.53.1

1 year ago

0.51.0

1 year ago

0.51.1

1 year ago

0.50.0

1 year ago

0.49.0

1 year ago

0.48.2

1 year ago

0.47.3

2 years ago

0.48.0

1 year ago

0.47.1

2 years ago

0.48.1

1 year ago

0.47.2

2 years ago

0.46.0

2 years ago

0.45.1

2 years ago

0.44.0

2 years ago

0.45.0

2 years ago

0.44.1

2 years ago

0.43.1

2 years ago

0.43.0

2 years ago

0.42.4

2 years ago

0.42.2

2 years ago

0.42.3

2 years ago

0.42.1

2 years ago

0.42.0

2 years ago

0.41.0

2 years ago