Socket
Socket
Sign inDemoInstall

@daffodil/analytics

Package Overview
Dependencies
8
Maintainers
2
Versions
64
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @daffodil/analytics

General package for piping ngrx actions into provided external analytics services.


Version published
Maintainers
2
Created

Changelog

Source

0.70.0 (2024-05-15)

⚠ BREAKING CHANGES

  • cart: use operation entity state for item entities (#2794)
  • cart,cart-store-credit: DaffCartShippingInformation has been removed. Use DaffCartShippingRate instead
  • navigation: MagentoNavigationDriverConfiguration -> MagentoNavigationDriverConfig

Features

  • all: simplify and remove redundant generics (#2791) (40eee41)
  • cart,cart-store-credit: remove DaffCartShippingInformation (#2788) (b4cc19b)
  • cart,order: set redirect token default value (#2780) (207a75c)
  • cart: add daffCartGetItemTotalDiscount (#2797) (0c1edcc)
  • cart: extract cart payment processor effect to reusable function (#2790) (0e654a2)
  • cart: use operation entity state for item entities (#2794) (b2c1e90)
  • core: add DaffFailable (#2786) (4839705)
  • core: add identity function (#2785) (5c6aa86)
  • core: add error to DaffState (#2781) (bb715eb)
  • core: add type for Constructable args (#2783) (ba11f43)
  • core: include ngrx entity selectors in operation entity selectors (#2782) (3fe7c8c)
  • core: make operation entity adapter extensible (#2795) (589a06c)
  • core: replace mutating with updating (#2787) (cc8a00d)
  • core: set state to error for operation failure (#2796) (dc08afa)
  • design: rename <daff-progress-indicator> to <daff-progress-bar> (#2510) (bbc3904)
  • navigation: add getTree method (#2793) (e300d70)
  • navigation: standardize magento driver config (#2784) (0f20924)
  • router: add service for observing route data (#2778) (77d991f)

Bug Fixes

  • cart: item states get added for a cart retrieval actions (#2799) (2a8c77f)
  • core: selectLoading returns true for not loading state (#2798) (c7f164e)
  • product: get all products fails in magento driver (#2789) (bdc59f0)

Readme

Source

@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 { }

FAQs

Last updated on 15 May 2024

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc