Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
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 see our installation guide for instructions on installing and using our JavaScript SDK.
5.11.0 - Released on April 6, 2020
See our JavaScript SDK Reference for a list and description of all available SDK methods.
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:
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.
Amplitude
The MIT License (MIT)
Copyright (c) 2014 Amplitude
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
5.11.0 (April 6, 2020)
sameSiteCookie
option to set the SameSite cookie. It is set to None
by defaultFAQs
Javascript library for Amplitude Analytics
The npm package amplitude-js receives a total of 165,560 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.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.