Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
akio-browser
Advanced tools
The Akio JavaScript SDK is used to collect web analytics for decentralized applications.
Readme
The Akio JavaScript SDK is used to collect web analytics for decentralized applications.
This library is available as a package on NPM. To add to your project, run:
yarn add akio-browser
To get started, import the Akio
object from akio-browser
like a normal Node.js module.
// Step 1: Import the library.
import Akio from 'akio-browser';
// Step 2: Initialize Akio with your token that you created on Akio Insights.
const akio = await Akio.init({
token: 'your-token-here',
});
// Step 3: Identify a unique user by passing in a required userId and an optional userAddress.
// If your app has no concept of a userId, you may provide the userAddress for both fields.
// Passing in a userAddress will automatically link your user with on-chain data.
await akio.identify({
userId: 'user@example.com',
userAddress: '0xdf215d5794bd2fb6eab88d05aabcbc8766ef4480',
});
// Step 4: Track a web event by passing in the event name.
await akio.track({
event: 'Viewed Home Page',
});
The Akio
object contains 3 main methods:
Initialize the Akio
instance by providing your token. You can get a token by creating an account on Akio Insights.
const akio = Akio.init({
token: 'your-token-here',
});
Other init
options:
Option | Values | Description |
---|---|---|
verbose | true / false | Set to true to enable verbose logging. |
debug | true / false | Set to true to enable debug logging. |
persistence | 'cookie' / 'localStorage' | Specify the preferred storage medium for tracking sessions. |
To identify a specific user on your application, provide a unique userId
for each user. You may also pass a user's wallet address as userAddress
to automatically join with on-chain data on Akio Insights.
Additional properties supplied to the identify
method will be saved on the user object and viewable on a user's profile.
akio.identify({
userId: 'user@example.com',
userAddress: '0xdf215d5794bd2fb6eab88d05aabcbc8766ef4480',
});
To track an event, simply provide an event
name to the track
call. Browser information is automatically logged with each event so the only required argument is the event name.
Additional properties supplied to the track
method will be saved and associated with this event. All event properties are viewable on the live view for your app on Akio Insights.
akio.track({
event: 'Viewed Home Page',
});
If you have any questions or would like to get early-access to the SDK, contact us at team@akiolabs.com.
FAQs
The Akio JavaScript SDK is used to collect web analytics for decentralized applications.
The npm package akio-browser receives a total of 12 weekly downloads. As such, akio-browser popularity was classified as not popular.
We found that akio-browser demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.