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), which is created for increasing usability and simplicity for our api.

  • 0.0.1
  • 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, which is created for increasing usability and simplicity for our api.

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

Installation

npm install @arcx-attribuition-sdk
yarn add @arcx-analytics-sdk

Api

init

This function is used to initializate the ArcxAnalyticsSdk instance. An api key is required to initializing the instance. In order to get your key please contact us to initiate the collaboration process.

init takes two arguments:

  1. Generated by Arcx Team api key - required
  2. Sdk configuration (detail info explainded below in the example) - optional

Example:

import { ArcxAnalyticsSdk } from 'arcx-analytics-sdk'

...
await arcxAnalyticsSdk = await ArcxAnalyticsSdk.init(
  YOUR_API_KEY,
  {
    trackPages: true, // default - automatically trigger PAGE event if url changed after click
    cacheIdentity: true, // default - cache identity of user in his browser's local storage
  }
)

event

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

Example:

import { ArcxAnalyticsSdk } from 'arcx-analytics-sdk'

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

page

Used to save a standardized event in order to standardize and simplify tracking page's changes.

Example:

import { ArcxAnalyticsSdk } from 'arcx-analytics-sdk'

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

transaction

Used to save a standardized event in order to standardize and simplify tracking executed transactions.

Example:

import { ArcxAnalyticsSdk } from 'arcx-analytics-sdk'

...
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 transaction
)

connectWallet

Used to save a standardized event in order to standardize and simplify tracking connected wallets.

Example:

import { ArcxAnalyticsSdk } from 'arcx-analytics-sdk'

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

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

FAQs

Package last updated on 07 Jul 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