Setup
Confused about "Setup"?
Let us know how we can improve our documentation:
LAST EDIT Oct 14 2024
- On This Page:
- Using CommonJS Modules
- Client Setup
The code below shows how to install Stream's Analytics SDK:
Include the above code snippet in the <head></head>
section of your page.
JavaScript is loaded asynchronously for optimal performance.
Using CommonJS Modules
Copied!Confused about "Using CommonJS Modules"?
Let us know how we can improve our documentation:
If you're using CommonJS modules, run the following command in your project directory:
After installing the package, require it in your app:
Client Setup
Copied!Confused about "Client Setup"?
Let us know how we can improve our documentation:
The snippet below shows you how to initialize Stream's analytics client:
Bind the service in your application's manifest.xml
:
Always specify the current user before sending events: