![Create React App Officially Deprecated Amid React 19 Compatibility Issues](https://cdn.sanity.io/images/cgdhsj6q/production/04fa08cf844d798abc0e1a6391c129363cc7e2ab-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
@arcxmoney/analytics
Advanced tools
The ARCx Analytics SDK is a utility that wraps around the [ARCx Analytics API](https://docs.arcx.money/#tag--analytics). It provides a simple and seamless installation experience for partners looking to integrate into ARCx.
The ARCx Analytics SDK is a utility that wraps around the ARCx Analytics API. It provides a simple and seamless installation experience for partners looking to integrate into ARCx.
Please contact us via Discord to be issued an API key.
npm install @arcxmoney/analytics --save
yarn add @arcxmoney/analytics
const analytics = await ArcxAnalyticsSdk.init(YOUR_API_KEY)
await analytics.attribute({ channel: 'twitter' })
await analytics.connectWallet({ account: '0x123', chain: 1 })
await analytics.transaction({
chain: 1,
transactionHash: '0xABC123',
metadata: {
usedSuggestedExchange: true
}
})
When the SDK is initialised via the init
method, it can be optionally passed
in a collection of configuration options. The defaults the SDK picks are sensible for most use cases.
The configuration options are:
trackPages
(boolean) - tracks whenever there is a URL change during the session and logs it automatically. Defaults to true
cacheIdentity
(boolean) - caches the identity of users in the browser's local storage to capture cross-session behaviours. Defaults to true
init
To initialise the Analytics SDK one should invoke the init
method on the
class. This configures the SDK with your API key and, optionally, configuration
options.
Parameters:
apiKey
(string) - the ARCx-provided API key.config
(object) - overrides of SDK configuration
trackPages
(boolean) - automatically logs page visit events.cacheIdentity
(boolean) - captures cross-session behaviours.await analytics = await ArcxAnalyticsSdk.init(
YOUR_API_KEY, // The ARCx-provided API key
{
trackPages: true,
cacheIdentity: true,
}
)
event
A generic, catch-all event
log. Use this method when no existing methods
satisfy your requirements.
Parameters:
event
(string) - the ID used to track this specific event.attributes
(object) - an arbitrarily structured object of event information.Example:
await analytics.event(
'CHANGED_PFP',
{
oldPFP: 'dingo',
newPFP: 'unicorn',
}
)
page
Allows manual logging page visit events. Only use this method when trackPages
is set to false
.
Parameters:
attributes
(object)
url
(string) - the new URL that the user has navigated to.Example:
await analytics.page({url: 'https://dapp.com/subpage/'})
connectWallet
Logs when a user connects their wallet to the dApp.
Parameters:
attributes
(object)
chain
(string | number) - the chain ID which this address applied to.account
(string) - the address of connected wallet on the supplied chain.Example:
await analytics.connectWallet({
account: '0x123',
chain: 1,
})
transaction
Logs when a transaction is submitted by a user.
Parameters:
attributes
(object)
chain
(string | number) - the chain ID where the transaction took place.transactionHash
(string) - the transaction hash of the transaction.metadata
(object) - an optional collection of transaction metadata that you wish to capture.Example:
await analytics.transaction({
chain: 1,
transactionHash: '0xABCabc123',
})
attribute
Attaches metadata about a session indicating the origination of the traffic. Used for more advanced analytics.
Parameters:
attributes
(object)
source
optional(string) - the source
that the traffic originated from (e.g. discord
, twitter
)medium
optional(string) - the medium
, defining the medium your visitors arrived at your sitesocial
, email
)campaign
optional(string) - the campaign
if you wish to track a specific marketing campaign (e.g. bankless-podcast-1
, discord-15
)Example:
await analytics.attribute({
source: "discord",
campaignId: "ama--2022-10-10",
})
FAQs
[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/) [![npm version](https://badge.fury.io/js/@arcxmoney%2Fanalytics.svg)](https://badge.fury.io/js/@arcxmoney%2Fanalytics) [![seman
The npm package @arcxmoney/analytics receives a total of 0 weekly downloads. As such, @arcxmoney/analytics popularity was classified as not popular.
We found that @arcxmoney/analytics demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
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.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.