![Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility](https://cdn.sanity.io/images/cgdhsj6q/production/97774ea8c88cc8f4bed2766c31994ebc38116948-1664x1366.png?w=400&fit=max&auto=format)
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
@brainfish-ai/web-tracker
Advanced tools
Steps to install the Brainfish Tracker SDK in your web application.
npm install @brainfish-ai/web-tracker
import { Tracker } from '@brainfish-ai/web-tracker';
const tracker = new Tracker({
accessKey: '{accessKey}',
trackScreenViews: true,
// trackAttributes: true,
// trackOutgoingLinks: true,
});
You're now ready to use the library.
// Sends an event with payload foo: bar
tracker.event('my_event', { foo: 'bar' });
// Identify with user id
tracker.setUserId('123');
// or with additional data
tracker.setUser({
userId: '123',
firstName: 'John',
lastName: 'Doe',
email: 'john.doe@brainfi.sh',
});
// Increment a property
tracker.increment('app_opened'); // increment by 1
tracker.increment('app_opened', 5); // increment by 5
// Decrement a property
tracker.decrement('app_opened'); // decrement by 1
tracker.decrement('app_opened', 5); // decrement by 5
tracker.event('my_event', { foo: 'bar' });
Keep track of your users by identifying them with a unique id. This is a good features if you have things behind a login and want to track user behavior.
const userId = '123';
tracker.setUserId(userId);
This method does the same as setUserId
but also allows you to update the user with additional data.
const userId = '123';
tracker.setUser({
userId,
// firstName?: string;
// lastName?: string;
// email?: string;
// avatar?: string;
// properties?: Record<string, unknown>;
});
Increment a property on the user.
// Increment by 1
tracker.increment('app_opened');
// Increment by 5
tracker.increment('app_opened', 5);
Decrement a property on the user.
// Increment by 1
tracker.decrement('app_opened');
// Increment by 5
tracker.decrement('app_opened', 5);
Clear the user id and all the data.
tracker.clear();
FAQs
Brainfish Tracker for Web
We found that @brainfish-ai/web-tracker 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
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.