🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

@exodus/analytics

Package Overview
Dependencies
Maintainers
1
Versions
68
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@exodus/analytics

This Exodus SDK feature enables you to generate client-side analytics.

15.3.0
latest
Source
npm
Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

@exodus/analytics

This Exodus SDK feature enables you to generate client-side analytics.

Install

yarn add @exodus/analytics

Usage

This feature is designed to be used together with @exodus/headless. See using the sdk.

import createExodus from '@exodus/headless'
import analytics from '@exodus/analytics'

const container = createExodus({ adapters, config, debug })
container.use(
  analytics({
    segmentConfig: {
      apiKey: '<get this from segment.io>',
    },
  })
)

[!IMPORTANT] Note: this feature defaults to using event payload validation using @exodus/analytics-validation. If you want to skip client-side validation (don't do it, it's dangerous), you can inject an alternative validateAnalyticsEvent dependency via the IOC.

Play with it

API Side

See using the sdk for more details on how features plug into the SDK and the API interface in the type declaration.

API Reference

Property nameDescription
trackTrack an event. To track events before a wallet primary seed is known, e.g. during onboarding, call track({ force: true, ...rest }). To throttle tracked events, use track({ sample }) with sample ranging from 0-1, e.g. track({ sample: 0.2, ...rest }) will pass through 20% of events.
trackInstallTrack an install event.
identifyUsed to set global "traits". Should be used sparingly -- e.g. on seed import or seed create.
setDefaultEventPropertiesSets persistent properties to be sent with every track call.
requireDefaultEventPropertiesIf called, will postpone track calls until the provided properties are set via setDefaultEventProperties.
getUserIdGets the permanent user id, derived from the wallet's primary seed

UI

This feature doesn't provide any selectors, so use the API directly from the UI, as described above.

FAQs

Package last updated on 12 May 2025

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