New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@arcxmoney/analytics

Package Overview
Dependencies
Maintainers
4
Versions
38
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@arcxmoney/analytics

`ArcxAnalyticsSdk` is a wrapper for [ARCx Analytics API](https://docs.arcx.money/#tag--analytics). It aims at increasing the usability and simplicity of our API.

  • 0.0.8
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
67
decreased by-88.49%
Maintainers
4
Weekly downloads
 
Created
Source

ArcxAnalyticsSdk

ArcxAnalyticsSdk is a wrapper for ARCx Analytics API. It aims at increasing the usability and simplicity of our API.

const arcxAnalyticsSdk = await ArcxAnalyticsSdk.init(YOUR_API_KEY)
await arcxAnalyticsSdk.event('EXAMPLE_EVENT', {
  attribute: 'random',
  anotherAttribute: 'value',
})

Installation

npm install @arcxmoney/analytics
yarn add @arcxmoney/analytics

Api

init

This function is used to initialize the ArcxAnalyticsSdk instance. An api key is is required to invoke it, simply contact us and we'll be happy to provide you one and start our collaboration.

init takes two arguments:

  1. Api key (generated by the ARCx team) - required
  2. Sdk configuration (see example below for detailed information) - optional

Example:

import { ArcxAnalyticsSdk } from '@arcxmoney/analytics'

...
await arcxAnalyticsSdk = await ArcxAnalyticsSdk.init(
  YOUR_API_KEY,
  {
    trackPages: true, // default - automatically trigger PAGE event if the url changes after click
    cacheIdentity: true, // default - caches identity of users in their browser's local storage
  }
)

event

Save a custom event in order to be analysed by the ARCx Team.

Example:

import { ArcxAnalyticsSdk } from '@arcxmoney/analytics'

...
await arcxAnalyticsSdk = await ArcxAnalyticsSdk.init(YOUR_API_KEY)
await arcxAnalyticsSdk.event(
  'EXAMPLE_EVENT',
  {
    attribute: 'random',
    anotherAttribute: 'value',
  },
)

page

Save a standardized event to track changes on a given page.

Example:

import { ArcxAnalyticsSdk } from '@arcxmoney/analytics'

...
await arcxAnalyticsSdk = await ArcxAnalyticsSdk.init(YOUR_API_KEY)
await arcxAnalyticsSdk.page(
  'EXAMPLE_EVENT',
  {
    url: 'https://target.url',
  },
)

transaction

Save a standardized event to track executed Web3 transactions.

Example:

import { ArcxAnalyticsSdk } from '@arcxmoney/analytics'

...
await arcxAnalyticsSdk = await ArcxAnalyticsSdk.init(YOUR_API_KEY)

await analyticsSdk.transaction(
  transactionType, // required(string) - type of trasaction e.g. 'SWAP', 'STAKE'...
  transactionHash, // optional(string) - hash of the transaction
  attributes, // optional(object) - additional information about the transaction
)

connectWallet

Save a standardized event to track connections to wallets.

Example:

import { ArcxAnalyticsSdk } from '@arcxmoney/analytics'

...
await arcxAnalyticsSdk = await ArcxAnalyticsSdk.init(YOUR_API_KEY)

await analyticsSdk.connectWallet({
  account: '0x1234',
  chain: '1',
})

FAQs

Package last updated on 05 Sep 2022

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