effect-analytics
TypeScript icon, indicating that this package has built-in type declarations

0.0.2 • Public • Published

effect-analytics

An Effect library for working with Analytics. Wraps the @analytics/* pluggable analytics library.

import { Effect } from "effect";
import { AnalyticsInstance, Analytics as Instance } from "analytics";
import * as A from "effect-analytics"

const instance = Instance({
  app: "app",
  plugins: [],
});

const program = pipe(
  Effect.sync(() => ({ data: 1 })),
  Effect.tap(x => A.track("test", x)), // sends { data: 1 } w/ tag "test" to configured providers.
  Effect.provideService(Analytics, instance)
);

/effect-analytics/

    Package Sidebar

    Install

    npm i effect-analytics

    Weekly Downloads

    0

    Version

    0.0.2

    License

    MIT

    Unpacked Size

    7.42 kB

    Total Files

    13

    Last publish

    Collaborators

    • kellyjesse881