Version:

JavaScript SDK

Track event data and send it your specified destinations using the RudderStack JavaScript SDK.

RudderStack’s JavaScript SDK lets you track customer event data from your website and send it to your specified destinations.

The latest SDK v3 is written in TypeScript and is a lightweight, efficient, and optimized version of its predecessor.

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

info
If you are migrating from an older version, see Breaking Changes before you start using the latest JavaScript SDK.

JavaScript SDK badge

Key features

  • Fast, reliable, and less vulnerable to ad blockers.
  • Load specific SDK features on demand using plugins.
  • Lightweight storage data footprint with improved encryption.
  • Complete control over the persistent data storage strategy.
  • ITP (Intelligent Tracking Prevention) compliant as it implements server-side cookies.
  • Smaller SDK of around 25KB (size reduction of approximately 30% from the previous version).

Get started

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

GuideDescription
QuickstartSet up and use the JavaScript SDK in no time.
InstallationInstall the JavaScript SDK via CDN or NPM.
Migration GuideMigrate the JavaScript SDK to the latest version.
Load the SDKLoad the JavaScript SDK using different options.
Supported APIsTrack event data using the supported API calls.
Data PersistenceDetails on the data persisted by the SDK.
Server-side CookiesUse server-side cookies for effective tracking.
Configure Persistent Data StorageSet your data storage preferences while loading the JavaScript SDK.
Event FilteringFilter events to specific destinations.
Detect Ad-blocked PagesDetect ad-blocked pages using the JavaScript SDK.
Service Worker SDKUse the JavaScript service worker SDK in browser extensions and serverless runtime.
Usage in Chrome ExtensionsUse the JavaScript SDK in Chrome extensions as a content script or background script.
Breaking ChangesLearn about the breaking changes introduced in the latest SDK version.
New FeaturesUnderstand the newly introduced features in the latest JavaScript SDK.
FAQSolutions to the commonly asked questions on the JavaScript SDK.

Older versions



Questions? Contact us by email or on Slack