
Research
Security News
Malicious PyPI Package Exploits Deezer API for Coordinated Music Piracy
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
amplitude-js
Advanced tools
The amplitude-js npm package is a JavaScript library for integrating Amplitude's analytics platform into web applications. It allows developers to track user interactions, events, and behaviors to gain insights into user engagement and product usage.
Initialize Amplitude
This feature initializes the Amplitude instance with your API key, allowing you to start tracking events and user interactions.
const amplitude = require('amplitude-js');
amplitude.getInstance().init('YOUR_API_KEY');
Track Events
This feature allows you to log custom events with optional event properties. It helps in tracking specific user actions within your application.
amplitude.getInstance().logEvent('EVENT_NAME', { key: 'value' });
Identify Users
This feature sets a unique user ID for tracking individual users. It is useful for identifying and analyzing user-specific behaviors.
amplitude.getInstance().setUserId('USER_ID');
Set User Properties
This feature allows you to set custom properties for a user, which can be used for segmentation and more detailed analysis.
amplitude.getInstance().setUserProperties({ key: 'value' });
Revenue Tracking
This feature enables revenue tracking by logging transactions and purchases, helping you understand the financial impact of user actions.
const revenue = new amplitude.Revenue().setProductId('PRODUCT_ID').setPrice(9.99);
amplitude.getInstance().logRevenueV2(revenue);
Mixpanel is another popular analytics platform that offers similar functionalities to Amplitude, such as event tracking, user identification, and property setting. Mixpanel also provides advanced features like A/B testing and user retention analysis.
Google Analytics is a widely-used analytics service that tracks and reports website traffic. While it offers robust event tracking and user analysis features, it is more focused on web traffic and marketing analytics compared to Amplitude's product analytics.
A JavaScript SDK for tracking events and revenue to Amplitude.
Please visit our :100:Developer Center for instructions on installing and using our the SDK.
Click here to view the JavaScript SDK Changelog.
This library now supports react-native. It has two dependencies on react-native modules you will have to install yourself:
The cookie format has been changed to be more compact. If you use the same Amplitude project(API key) across multiple applications, and you track anonymous users across those applications, you will want to update amplitude across all those applications at the same time. Otherwise these anonymous users will have a different device id in your different applications.
If you do not have multiple installations of amplitude, or if you do not track anonymous users across different installations of amplitude, this change should not affect you.
We stopped committing the generated amplitude.min.js and amplitude.js files to
the repository. This should only affect you if you load amplitude via github.
You should use npm
or yarn
instead.
We dropped our custom symbian and blackberry user agent parsing to simply match what the ua-parser-js library does.
The library now defaults to sending requests to https://api.amplitude.com instead of //api.amplitude.com. This should only affect you if your site does not use https and you use a Content Security Policy.
If you have any problems or issues over our SDK, feel free to create a github issue or submit a request on Amplitude Help.
7.1.0 (Jun 28, 2020)
Device Type
field change from version 5.10.0 to show OS name again.FAQs
Javascript library for Amplitude Analytics
The npm package amplitude-js receives a total of 195,768 weekly downloads. As such, amplitude-js popularity was classified as popular.
We found that amplitude-js demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 8 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.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.
Security News
Newly introduced telemetry in devenv 1.4 sparked a backlash over privacy concerns, leading to the removal of its AI-powered feature after strong community pushback.