Feeling stuck with Segment? Say 👋 to RudderStack.

Log in

JavaScript SDK Integration

by RudderStack

Connect JavaScript SDK and send data from JavaScript SDK with Rudderstack.

Source

Event Stream

JavaScript SDK Integration

by RudderStack

Connect JavaScript SDK and send data from JavaScript SDK with Rudderstack.

Source

Event Stream

The RudderStack JavaScript SDK also enables you to filter and load your preferred destinations, and disable sending your events to other destinations. This way, you have full control over which third-party tools get access to your data. For example, you can send a specific set of events only to Google Analytics and Intercom, and disable sending those events to other destinations. The JavaScript SDK also enables sending a page view containing markers that indicate whether a page is ad-blocked or not. This way, you can analyze the data to find what percent of your site's page views are affected by ad-blockers. For more information, visit RudderStack's JavaScript SDK on GitHub.

Frequently Asked Questions

The RudderStack JavaScript API makes it easy for you to send your customer event data from your website to any destination in no time. After integrating this SDK, you will also be able to connect your website to multiple destinations such as Google Analytics, Hotjar, Amplitude, and more, to send your event data in real-time.

To load analytics.js correctly, copy either the minified or non-minified version of the code given in our documentation. To test if the library is loaded correctly, open the JavaScript console on your browser and run this command: rudderanalytics. If the command returns an object, the library is loaded successfully. If not, please verify if you have set up rudderanalytics.js correctly.

The different key methods used in the JavaScript SDK APIs are load(), identify(), page(), track(), alias(). While the load() method is used to load rudder-analytics.js on your website, the other API calls are used to get information related to the user and their actions on the website.

Use the JavaScript SDK integration with popular destinations

225 Integrations

About JavaScript SDK

RudderStack’s open-source JavaScript SDK lets you send event data from your website to a wide range of common, popular marketing, sales, and product tools such as Amplitude, Google Analytics, and more, without having to test or implement a new API every time.