npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

amplitude-js

v8.21.9

Published

Javascript library for Amplitude Analytics

Downloads

1,025,135

Readme

Test npm version Bower version

Announcement 📣

Amplitude is introducing a new TypeScript SDK for Browser. This new SDK provides improved developer experience, helps users instrument data more seamlessly and provide more control over data being instrumented using custom plugins.

To learn more about the new SDK, here are some useful links:

  • NPM: https://www.npmjs.com/package/@amplitude/analytics-browser
  • GitHub: https://github.com/amplitude/Amplitude-TypeScript
  • Documentation: https://developers.amplitude.com/docs/typescript-browser-beta

Official Amplitude JS/Web SDK

A JavaScript SDK for tracking events and revenue to Amplitude.

Amplitude and Ampli SDK

Ampli SDK is autogenerated library based on your pre-defined tracking plan. The Ampli SDK, is a lightweight wrapper over the Amplitude SDK that provides type-safety, supports linting, and enables features like input validation. The code replicates the spec in the Tracking Plan and enforces its rules and requirements. This repository is about Amplitude SDK. To learn more about Ampli SDK, please refer to the Ampli Browser and examples.

Installation and Quick Start

Demo Pages

  • A demo page showing a simple integration on a web page.
  • A demo page showing an integration using RequireJS.
  • A demo page demonstrating a potential integration with Google Tag Manager.

Deprecated - React Native

As of >= v8.0.0, this SDK no longer has support for React Native. We recently released a new SDK focused on providing a React Native first approach to using Amplitude in cross-platform projects. Amplitude React Native SDK

Previously used amplitude-js and looking to migrate to @amplitude/react-native?

Node.js

Please visit Amplitude-Node for our Node SDK.

Changelog

Click here to view the JavaScript SDK Changelog.

Upgrading Major Versions and Breaking Changes

6.0

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.

5.0

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.

4.0

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.

Need Help?

If you have any problems or issues over our SDK, feel free to create a github issue or submit a request on Amplitude Help.