JavaScript SDK

Send data to your destinations with the RudderStack JavaScript SDK.

RudderStack’s JavaScript SDK is the most popular and widely used SDK to track customer event data from your website and send it to your specified destinations.

Find the open source code for the JavaScript SDK on GitHub.

Github Badge


A new version of RudderStack JavaScript SDK (v3) is now available.

Some key features of this release are:

  • Smaller SDK size with increased loading speed.
  • Fast, reliable, and less vulnerable to adblockers.
  • Ability to choose the required SDK features via plugins.
  • Lightweight storage data footprint with improved encryption technique.

See JavaScript SDK v3 documentation for more information.

Refer to the following guides to learn more about the usage and features of the JavaScript SDK:

QuickstartGet started on setting up and using the JavaScript SDK.
Load the SDKDetailed steps on loading the JavaScript SDK using different options.
Supported APISupported API calls to track the event data.
Data StorageDetails on the persistent user data stored in cookies and local storage.
Event FilteringMethods to filter events and destinations while sending events.
Version MigrationDetailed steps on migrating the SDK from v1 to v1.1.
OneTrust Consent ManagerDetailed steps on integrating the JavaScript SDK with the OneTrust consent management platform.
Detect Ad-blocked PagesDetect ad-blocked pages using the JavaScript SDK.
EnhancementsDetailed guide on using the Beacon utility to send event payloads using the JavaScript SDK.
FAQCommonly asked questions on the JavaScript SDK and their solutions.

RudderStack also supports integrating the JavaScript SDK with Google Chromecast. You can build the web sender app by following these instructions and adding the JavaScript SDK. See Google Cast developer guide for more details.

Questions? Contact us by email or on Slack