Repository  -  API  -  Source


November 12, 2020

Bug Fixes

  • validation: Be able to take in and validate null object event/user properties (1ed41a3)


November 5, 2020

Bug Fixes


October 30, 2020

Bug Fixes

  • react-native: Change @react-native-community/async-storage to @react-native-async-storage/async-storage (#314) (382c5a4)


October 15, 2020



September 25, 2020

Bug Fixes


September 22, 2020

Bug Fixes


September 22, 2020

Bug Fixes

  • cookies: respect the options passed into cookies when testing to see if they're enabled (#294) (61b6590)



August 26, 2020
  • Fix an issue with detection of whether or not cookies are enabled on a device


June 28, 2020
  • Sync with upstream ua-parser to detect more browsers and devices
  • Fix race condition where the SDK might write to the wrong cookie domain
  • Fix race condition where the SDK might think cookies are disabled
  • Revert Device Type field change from version 5.10.0 to show OS name again.
  • Default SameSite cookie setting to Lax

Breaking Changes

  • The SDK cookie now defaults to SameSite=Lax
  • Windows Phone, IE Mobile, and Opera Mobile devices will be reported to amplitude slightly different. They will appear as "Windows Phone OS", "IEMobile", and "Opera Mobile" respectively.
  • The device type field has gone back to showing OS name.


May 1, 2020
  • Invoke the logEvent callbacks when a request is actually sent or when we give up on sending a request.
  • Pass the initialized amplitude instance to the onInit callback.
  • Fix language validation issue that occured when language was undefined.


April 23, 2020
  • Use a more compact format for newly generated device IDs
  • Fix issue with react native failing to initialize metadatastorage


April 17, 2020
  • Fix issue where the UMD module did not build.


April 17, 2020
  • Use a more compact cookie format
  • Fix issue where a cookie key could have a space appear inside of it
  • Allow for localStorage fallback with the disableCookie option.
  • Only new and unseen devices will get the compact cookie. cookieForceUpgrade will force all browsers to upgrade and delete the old cookie.

Breaking Changes

  • 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.


April 12, 2020
  • Use an IIFE build for the snippet. This will solve issues where the snippet wouldn't load for require js users.


April 6, 2020
  • Add a sameSiteCookie option to set the SameSite cookie. It is set to None by default


March 10, 2020
  • Library field for event will include amplitude-react-native when using SDK in react native.
  • Device Type field now will show the actual device model instead of OS name.


February 3, 2020
  • Add default versionName to for react-native


December 6, 2019
  • Add support to defer saving an amplitude cookie and logging events until a user has opted in


December 2, 2019
  • Fix issue where null unsentKey and unsentIdentifyKeys were causing log crashes


November 22, 2019
  • Namespace AsyncStorage with api key to prevent cross domain contamination


October 21, 2019
  • Drop esm module from package.json to prevent it from being the default build.
  • Add fallback localStorage support to the esm module.
  • Fix integrity hash


October 9, 2019
  • Fix bug where optOut settings would be overridden by cookie loading
  • Fix initialization bugs introduced by removing legacy data migration code.
  • Use @react-native-community/async-storage instead of the deprecated AsyncStorage.
  • Pull react-native device identifier from device info when possible
  • Pull react-native unsent events from async storage


October 1, 2019
  • Fix issues with react native device identification
  • Remove legacy cookie migration code


August 26, 2019
  • Fix bug where runQueuedFunctions was unnecessarily being called on module import
  • Update dependencies to pass yarn audit again.


August 14, 2019
  • Add ES Module build #183
  • Fix setDomain bug where setting the cookie domain clobbered other cookie setings


March 29, 2019
  • Stop warning when undefined property values are instrumented


March 28, 2019
  • Fix npm publish failure where built files were missing.


March 28, 2019
  • Stop warning when null property values are instrumented
  • Allow for objects nested within arrays


March 19, 2019
  • Add onInit method that accepts a callback that will be invoked after init
  • Allow for api endpoints that do not end with a trailing slash
  • Sync with upstream ua-parser for user agent parsing
  • Upgrade rollup/babel dependencies
  • Invoke runQueuedFunctions from the main library instead of the snippet. This will allow integrations to take advantage of the queueing feature on sites that do not use the snippet.

Breaking Changes

  • Drop JSON polyfill. This will break IE 7 and older. You can install your own JSON polyfill before loading amplitude.
  • Stop committing generated files to the master branch in the git repository. You should not install amplitude from the master git branch. You should never import amplitude.min.js into your build.
  • Drop custom user agent parsing for symbian and blackberry


March 12, 2019
  • Cherry-picked from 5.0.0: Add onInit method that accepts a callback that will be invoked after init


February 25, 2019
  • Add support for unsetting utm params when a new session is created
  • Update dependencies to pass yarn audit
  • Bugfix: Allow logLevel to be set to disabled.
  • Bugfix: Update ua-parser to work in quirks mode in older internet explorer versions
  • Fetch ua-parsers-js from npm instead of github
  • Add secureCookie option to add a secure flag to the cookie


November 10, 2018
  • Bugfix: Default groupProperties to empty object in logEvent.


November 7, 2018
  • Fix error that might occur if another party defines a global variable named Buffer that is not actually a Buffer.

  • Fix bug where the log level was not initialized correctly


October 24, 2018
  • Add support for groupIdentify calls


July 25, 2018
  • Added trackingOptions as a configuration option. This allows you to disable the automatic tracking of specific user properties such as ip_address, city, country, etc. See the Help Center Documentation for instructions on setting up th is configuration.


July 16, 2018
  • Add more context to the 'No request sent' responses


April 19, 2018
  • Add resetSessionId method that sets the sessionId to the current time.


March 22, 2018
  • Fix bug where cookie data such as device id from older releases were not migrated


January 18, 2018
  • Allow for numeric user ids

  • Namespace local storage with api key to prevent cross domain contamination


November 20, 2017
  • Default forceHttps option to true.


October 27, 2017
  • Add logLevel config option


September 14, 2017
  • Add setSessionId(sesionId) method. Note this is not recommended unless you know what are you doing.
  • Added support for Bower. Install using bower install amplitude-js.
  • Switched from webpack to Rollup for building the SDK.


September 13, 2017
  • Supports clean NPM module loading eg: const amplitude = require('amplitude'); or import 'amplitude' from 'amplitude-js';
  • SDK is now a proper UMD module. Supports RequireJS with r.js builds now.
  • Updated build process to use webpack


June 29, 2017
  • Handle SDK loading errors in the load snippet. Please update the load snippets on your website to the latest version.
  • Migrating setup instructions and SDK documentation in the README file to Zendesk articles.


November 8, 2016
  • Add logEventWithTimestamp to allow logging events with a custom timestamp. The timestamp should a number representing the time in milliseconds since epoch. See documentation for more details.
  • Add configuration option deviceIdFromUrlParam, which when set to true will have the SDK parse device IDs from url parameter amp_device_id if available. Device IDs defined in the configuration options during init will take priority over device IDs from url parameters.


October 28, 2016
  • Updated our UA-parser-js fork to properly parse the version number for Chrome Mobile browsers.


October 26, 2016
  • Fix bug where tracking UTM params and referrer drops unsent events that have been saved to localStorage.


October 19, 2016
  • Add option to track GCLID (Google Click ID) as a user property (set includeGclid to true in the SDK configuration).
  • Add option to track new UTM parameters, referrer, and GCLID values during the same session. By default the SDK only saves the values once at the start of the session. You can remove this restriction by setting saveParamsReferrerOncePerSession to false in the SDK configuration. See the Readme for more information.


October 7, 2016
  • Block event property and user property dictionaries that have more than 1000 items. This is to block properties that are set unintentionally (for example in a loop). A single call to logEvent should not have more than 1000 event properties. Similarly a single call to setUserProperties should not have more than 1000 user properties.


September 14, 2016
  • Add configuration option forceHttps, which when set to true forces the SDK to always upload to HTTPS endpoint. By default the SDK uses the endpoint that matches the embedding site's protocol (for example if your site is HTTP, it will use the HTTP endpoint).


July 6, 2016
  • productId is no longer a required field for Revenue logged via logRevenueV2.
  • Track raw user agent string for backend filtering.


June 22, 2016


May 27, 2016
  • Add support for logging events to multiple Amplitude apps. Note this is a major update, and may break backwards compatability. See Readme for details.
  • Init callback now passes the Amplitude instance as an argument to the callback function.


May 26, 2016
  • Update our fork of UAParser.js from v0.7.7 to v0.7.10. This will improve the resolution of user agent strings to device and OS information.


April 21, 2016
  • Silence console warnings for various UTM property keys with undefined values.


April 20, 2016
  • Add support for setting groups for users and events. See the Readme for more information.
  • Add logRevenueV2 and new Revenue class to support logging revenue events with properties, and revenue type. See Readme for more info.
  • Add helper method to regenerate a new random deviceId. This can be used to anonymize a user after they log out. Note this is not recommended unless you know what are you doing. See Readme for more information.


April 14, 2016
  • Add tracking of each user's initial_utm parameters (which is captured as a set once operation). Utm parameters are now sent only once per user session.
  • Add documentation for SDK functions. You can take a look here. A link has also been added to the Readme.
  • Fix cookie test bug. In rare cases, the cookie test failed to delete the key used in testing. Reloading the page generated new keys, filling up the cookie over time. Fixed test to re-use the same key.


March 30, 2016
  • Identify function now accepts a callback function as an argument. The callback will be run after the identify event is sent.
  • Add support for prepend user property operation. This allows you to insert value(s) at the front of a list. See Readme for more details.
  • Keep sessions and event metadata in-sync across multiple windows/tabs.


March 6, 2016
  • Fix bug where saveReferrer throws exception if sessionStorage is disabled.
  • Log messages with a try/catch to support IE 8.
  • Validate event properties during logEvent and initialization before sending request.
  • Add instructions for proper integration with RequireJS.


January 15, 2016
  • Add ability to clear all user properties.


December 15, 2015
  • Add getSessionId helper method to fetch the current sessionId.
  • Add support for append user property operation.
  • Add tracking of each user's initial_referrer property (which is captured as a set once operation). Referrer property captured once per user session.


December 1, 2015
  • If cookies are disabled by user, then fallback to localstorage to save the cookie data.
  • Migrate sessionId, lastEventTime, eventId, identifyId, and sequenceNumber to cookie storage to support sessions across different subdomains.


November 17, 2015
  • Fix bug where response code is not passed to XDomainRequest callback (affects IE versions 10 and lower).


November 6, 2015
  • Localstorage is not persisted across subdomains, reverting cookie data migration and adding a reverse migration path for users already on 2.6.0.


November 2, 2015
  • Migrate cookie data to local storage to address issue where having cookies disabled causes SDK to generate a new deviceId for returning users. - DEPRECATED


September 30, 2015
  • Add support for user properties operations (set, setOnce, add, unset).
  • Fix bug to run queued functions after script element is loaded and set to window.


September 21, 2015
  • Add support for passing callback function to init.
  • Fix bug to check that Window localStorage is available for use.
  • Fix bug to prevent scheduling multiple event uploads.


September 4, 2015
  • Add support for passing callback functions to logEvent.


September 2, 2015
  • Add option to batch events into a single request.


August 13, 2015
  • Fix bug where multi-byte unicode characters were hashed improperly.
  • Add option to send referrer information as user properties.


May 5, 2015
  • Use gzipped version of the library by default. If you still need the uncompressed version, remove ".gz" from the script url in your integration snippet.
  • Upgrade user agent parser for browser detection to keep up-to-date with browser updates.
  • Fix bug where Android browsers were reported as Safari on Linux.
  • Fix bug with line endings in UTF-8 encoder that was causing issues with checksums.


March 23, 2015
  • Add support for logging revenue data.
  • Add opt out setting to disable logging for a user.


March 2, 2015
  • Add option to gather UTM parameters and send them as event properties
  • Add support for detecting new sessions


January 22, 2015
  • Add language detection


January 2, 2015
  • Fix detect.js for AMD compatibility


December 19, 2014
  • Fix bug where session ids weren't stored when a session timed out
  • Add setDeviceId method


November 7, 2014
  • Fix iPad detection in user agent
  • Calls to setUserProperties now merge new properties instead of replacing
  • Fix bugs in cookies. Add reverse compatibility
  • Incorporate browser/device detection


September 11, 2014
  • Fix null/undefined error when missing config
  • Add session tracking
  • Add overrideable device id
  • Fix error where events were not getting removed from local storage
  • UTF-8 encode strings before MD5 hashing


June 11, 2014
  • Update to version 2 of data collection API.
  • Send client upload time and checksum
  • Rename setGlobalUserProperties to setUserProperties


April 17, 2014
  • Added ability to specifiy domain with cookies using setDomain method
  • Fixed Base64 encode method if window doesn't have bota method
  • Added try/catch around all public methods
  • Added Internet Explorer compatibility for JSON, and Ajax request
  • Add saveEvents configuration option
  • Use native Base64 encoding when available
  • Remove LZW/Base64 encoding from saving to localStorage to reduce latency
  • Save user id and global user properties to cookie
  • Save global user properties, change sdk url to https


January 14, 2013
  • Initial release
  • Add setVersionName function
  • Default global properties to empty array