Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@exodus/analytics

Package Overview
Dependencies
Maintainers
0
Versions
61
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@exodus/analytics

This library abstracts analytics reporting.

  • 1.0.1
  • Source
  • npm
  • Socket score

Version published
Maintainers
0
Created
Source

Exodus analytics

A base class encapsulating analytics integration.

Usage

import createStorage from '@exodus/storage-memory' // use the relevant platform-specific implementation
import analyticsDefinition from '@exodus/analytics'
import Tracker from '@exodus/segment-metrics'

const analytics = analyticsDefinition.factory({
  storage: storage.namespace('analytics'),
  shareActivityAtom,
  tracker: new Tracker(segmentApiKey),
  // optional
  config: {
    installEventReportingUrl,
  },
  logger,
})

analytics.connect('the-dummiest-anonymous-id')
analytics.track({
  event: 'hello world',
})

API reference

Property nameRequiredDescription
trackeryesA Tracker class instance.
storageyesAn object implementing the Storage interface (see below). Needed if you need to persist events (e.g. when a consumer application can be temporarily locked).
shareActivityAtomyesAn atom returning a boolean value indicating if a consumer application is ready to send events.
confignoStatic configuration options
config.installEventReportingUrlnoUrl to which to post app install events
type SerializedEvent = 'string'

interface Storage {
  set: (key: string, events: SerializedEvent[]) => Promise<undefined>
  get: (key: string) => Promise<SerializedEvent[]>
}

FAQs

Package last updated on 30 Jan 2023

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc