Title: Quick Start Locale: en URL: https://sensorswave.com/en/docs/getting-started/quick-start/ Description: Integrate the Sensors Wave SDK in 5 minutes and start collecting data Sensors Wave (or simply Wave) helps you quickly integrate tracking instrumentation and start collecting user behavior data. This guide will walk you through the entire process step by step — from creating a Pipeline, to installing and initializing the SDK, enabling tracking, and finally verifying data ingestion. ## Prerequisites Before you begin, make sure you have: - A Sensors Wave account and are logged in - Created the relevant Organization and corresponding Project ## Overview The complete quick start process consists of 5 steps: 1. **Create a Source (Pipeline)**: Create a Source configuration in the Pipeline module 2. **Get the SDK configuration code**: Obtain the auto-generated configuration code from the Pipeline details 3. **Install and initialize the SDK**: Follow the provided code to complete SDK installation and initialization 4. **Enable tracking and user identification**: Turn on AutoCapture and call the identify method to identify users 5. **Verify data ingestion**: View the collected data in the real-time data stream ## Step 1: Create a Source (Pipeline) Before integrating the SDK, you need to create a Source (Pipeline) in the Sensors Wave console. A Pipeline is the channel for data collection and reporting — different SDK types require their own Pipeline to be created. ### Steps 1. Log in to the Sensors Wave console 2. Go to **Data Center** → **Pipeline** module 3. Click the **Create Pipeline** button 4. Select the **Source (Pipeline)** type 5. Fill in the basic information: - **Task Name**: Enter a meaningful name, e.g., "Web Frontend Tracking" - **Task Description**: Briefly describe the purpose of this Pipeline (optional) - **SDK Type**: Select the SDK type corresponding to your tracking language 6. Click **Confirm** to complete the creation > **Tip**: Each SDK requires its own Pipeline. If multiple apps need to connect to the same Project, you can create multiple Pipelines for the same SDK type. ## Step 2: Get the SDK Configuration Code After creating the Pipeline, the system will automatically generate configuration code containing the Source Token and API Endpoint, which you can copy and use directly. ### Steps 1. In the Pipeline list, find the Pipeline you just created 2. Click the Pipeline name to enter the details page 3. In the **SDK Integration Guide** section, view the auto-generated installation and initialization code 4. The code already includes: - **Source Token**: Used to identify your Project - **API Endpoint**: The data reporting address > **Note**: The system-generated code is pre-populated with the correct configuration parameters. You can copy and use it directly without manually configuring the Token and Endpoint. ## Step 3: Install and Initialize the SDK This guide demonstrates the full process using the JavaScript SDK as an example. To integrate SDKs for other languages, please refer to the corresponding [SDK documentation](/docs/data-integration). ### Install the SDK Depending on the SDK type you selected, install it using the appropriate package manager: **JavaScript** ```bash # Using npm npm install @sensorswave/js-sdk # Or using yarn yarn add @sensorswave/js-sdk ``` **Go** ```bash go get github.com/sensorswave/sdk-go ``` **Android** ```gradle dependencies { implementation 'com.sensorswave:android-sdk:latest.release' } ``` **iOS** ```ruby pod 'SensorsWave' ``` ### Initialize the SDK Copy the code generated on the Pipeline details page into your project. Below are initialization examples for different languages: **JavaScript - ES6 Module Import (Recommended)** ```javascript // Initialize the SDK (using the Token and Endpoint from the Pipeline details page) SensorsWave.init('YOUR_SOURCE_TOKEN', { apiHost: 'https://your-api-endpoint.com', // Auto-populated data reporting address debug: false, autoCapture: false, }); ``` **JavaScript - CDN Import** ```html SensorsWave.init('YOUR_SOURCE_TOKEN', { apiHost: 'https://your-api-endpoint.com', // Auto-populated data reporting address debug: false, autoCapture: false, }); ``` **Go** ```go package main "log" "github.com/sensorswave/sdk-go" ) func main() { // Initialize using the configuration from the Pipeline details page client, err := sensorswave.New( sensorswave.Endpoint("https://your-api-endpoint.com"), sensorswave.SourceToken("YOUR_SOURCE_TOKEN"), ) if err != nil { log.Fatal(err) } defer client.Close() } ``` **Android** ```java // Initialize in the onCreate method of the Application class SensorsWave.init(this, new SensorsWaveConfig.Builder() .setSourceToken("YOUR_SOURCE_TOKEN") .setApiHost("https://your-api-endpoint.com") .setAutoCapture(false) .build()); ``` **iOS** ```swift // Initialize in AppDelegate let config = SensorsWaveConfig( sourceToken: "YOUR_SOURCE_TOKEN", apiHost: "https://your-api-endpoint.com" ) SensorsWave.initialize(with: config) ``` > **Important**: Be sure to use the actual Token and Endpoint generated on the Pipeline details page. The placeholders in the examples above need to be replaced with real values. ## Step 4: Enable Tracking and User Identification After initializing the SDK, you need to call the `identify` method to identify user identity. Additionally, if you are using a client-side SDK, we recommend enabling AutoCapture to collect data more quickly. ### Enable AutoCapture (Optional, Recommended) AutoCapture helps you automatically collect common user behaviors such as page views and clicks, without writing tracking code manually. Client-side SDKs have AutoCapture disabled by default — you can enable it by setting `autoCapture: true`. > **Recommended**: Enabling AutoCapture allows you to automatically collect Preset Events (such as page views, element clicks, etc.) without modifying your business code, helping you quickly complete basic data collection. > **Note**: AutoCapture is only supported by client-side SDKs (JavaScript, Android, iOS, etc.). Server-side SDKs (Go, Python, Java, etc.) do not support AutoCapture and require manual tracking instrumentation. **JavaScript Example** ```javascript // Enable AutoCapture SensorsWave.init('YOUR_SOURCE_TOKEN', { apiHost: 'https://your-api-endpoint.com', autoCapture: true, // Enable AutoCapture }); ``` **Android Example** ```java SensorsWave.init(this, new SensorsWaveConfig.Builder() .setSourceToken("YOUR_SOURCE_TOKEN") .setApiHost("https://your-api-endpoint.com") .setAutoCapture(true) // Enable AutoCapture .build()); ``` **iOS Example** ```swift let config = SensorsWaveConfig( sourceToken: "YOUR_SOURCE_TOKEN", apiHost: "https://your-api-endpoint.com" ) config.autoCapture = true // Enable AutoCapture SensorsWave.initialize(with: config) ``` ### Identify User Identity Sensors Wave identifies users through two types of IDs: - **Anonymous ID (AnonymousID)**: Automatically collected when the user is not logged in, typically a device identifier - **Login ID (LoginID)**: Must be actively set after the user logs in, used to associate user identity When a user logs in, you need to call the `identify` method to set the Login ID: **JavaScript Example** ```javascript // Associate user identity upon login const loginID = "user_12345"; SensorsWave.identify(loginID); ``` **Go Example** ```go // Set user identity client.Identify("user_12345", nil) ``` **Android Example** ```java // Call when the user logs in SensorsWave.identify("user_12345"); ``` **iOS Example** ```swift // Call when the user logs in SensorsWave.identify("user_12345") ``` > **Tip**: The `identify` method binds the Login ID with the current device's Anonymous ID, enabling user behavior tracking before and after login on a single device, or cross-device user behavior tracking. For more details, see [User Identification](/docs/data-integration/user-identification). ### Custom Event Tracking (Optional) In addition to AutoCapture, you can also manually track specific business events: **JavaScript Example** ```javascript // Track a button click SensorsWave.trackEvent('ButtonClick', { button_name: 'submit', page: 'home', category: 'user_action' }); // E-commerce scenario: Track adding a product to cart SensorsWave.trackEvent('AddToCart', { product_id: 'SKU-12345', product_name: '无线蓝牙耳机', category: '电子产品', price: 299.00, currency: 'CNY', quantity: 1 }); ``` **Go Example** ```go // Track an order completion event client.Track("user_12345", "Purchase", map[string]interface{}{ "order_id": "ORDER-2026-001", "total_amount": 299.00, "currency": "CNY", "payment_method": "alipay", "item_count": 1, }) ``` ## Step 5: Verify Data Ingestion After completing the configuration above, you can view real-time data in the Pipeline module to verify that data is being ingested correctly. ### Steps 1. Return to the Sensors Wave console 2. Go to **Data Center** → **Pipeline** 3. Find the Source (Pipeline) you created earlier and click to enter the details page 4. Click the **View Real-time Data Stream** button 5. Click the **Start Listening** button 6. Perform some actions in your application (e.g., page views, button clicks, user login, etc.) 7. Check whether the corresponding event data appears in the real-time data stream ### Verification Checklist - **Event Name**: Confirm the event name matches expectations (e.g., `PageView`, `ButtonClick`, `AddToCart`, etc.) - **Event Properties**: Check that event properties are complete and accurate - **User ID**: Verify that the Anonymous ID and Login ID are correctly associated - **Data Timeliness**: Data typically appears in the real-time data stream within 1-2 seconds > **Tip**: If you don't see data, please check: > - Whether the SDK is properly initialized > - Whether the Source Token and API Endpoint are configured correctly > - Whether the network connection is working > - Whether there are error messages in the browser console ## Important Notes ### Security Recommendations - **Source Token Protection**: The Source Token is sensitive information — do not expose it in public code repositories or front-end code - **Environment Variables**: It is recommended to use environment variables or configuration files to manage Source Token and API Endpoint - **HTTPS**: Ensure all data reporting is transmitted over HTTPS encryption ### Tracking Conventions - **Event Naming**: Use PascalCase for event names, e.g., `UserLogin`, `AddToCart`, `PageView` - **Property Naming**: Use snake_case for property names, e.g., `user_id`, `product_name`, `page_url` - **Avoid Duplication**: The same business action should use a single event name — avoid creating duplicate events ### Performance Considerations - **Event Sending Frequency**: Avoid sending a large number of events in a short period, as this may cause network congestion - **Batch Sending**: Most SDKs support batch event sending to improve delivery efficiency - **Asynchronous Processing**: Client-side SDKs send data asynchronously by default and will not block the main thread ### FAQ **Q: Why can't I see real-time data?** A: Please check the following: - Whether the SDK is properly initialized - Whether the Source Token and API Endpoint are configured correctly - Whether the network connection is working - Whether there are error messages in the browser console - Whether the Pipeline has been created and is in a normal state **Q: What is the difference between Anonymous ID and Login ID?** A: - Anonymous ID: Used for tracking users who are not logged in. It is automatically collected and is typically a device identifier. - Login ID: Used for identifying logged-in users. It must be set manually and associates user account information. **Q: How do I share user identity across multiple SDKs?** A: Use the same Login ID across all SDKs (client-side and server-side), and the system will automatically perform identity association and merging. ## Next Steps Congratulations! You have successfully completed the basic integration and configuration of the Sensors Wave SDK. Now you can: ### Advanced Features 1. **Custom Event Tracking**: Create custom events for business-specific actions to obtain more precise business data 2. **User Property Settings**: Add custom properties to users (such as user level, membership status, etc.) for more precise user analysis 3. **Data Insights Analysis**: Use the Insights features to perform multi-dimensional analysis on collected data and understand user behavior patterns 4. **A/B Experiments**: Create A/B Experiments based on collected data to validate the effectiveness of product optimization strategies 5. **Explore More SDK Documentation**: Learn how to integrate the Sensors Wave SDK in other application types (mobile, backend services, etc.) ### Related Resources - **[Data Integration Preparation](data-integration-preparation.mdx)**: Learn about the complete data integration plan and best practices - **[SDK Documentation](../data-integration/client-sdks/javascript.mdx)**: View the detailed JavaScript SDK documentation - **[Tracking Conventions](../data-integration/tracking-strategy.mdx)**: Learn about tracking naming conventions and design principles - **[Insights](../analytics/overview.mdx)**: Learn how to use analytics features to extract data value --- **Last updated**: January 19, 2026