Web JS SDK
|
Collect
1. Document Directory
2. SDK Function List
Level 1 Function | Level 2 Function | Specific Function / Description |
---|---|---|
Identify Users | Automatically identify anonymous users | Automatically identify anonymous users using device ID |
Support replacing with custom anonymous ID | ||
Identify Logged-in Users | Identify logged-in users using login ID | |
Set User Attributes | ||
Collect Data | Automatically collect browser information | Automatically collect default device manufacturer, operating system, browser version, etc. |
Full-featured tracking | Web browsing pages | |
Web Element Click | ||
Web View Stay | ||
Common Properties | Static Common Properties | |
Dynamic Common Properties | ||
Clear Common Properties | ||
Custom Tracking | Custom Code Tracking | |
Data Reporting | Automatic Data Reporting | The SDK automatically sends event data under certain conditions |
Debug Function | Debug Mode | Enable/Disable Debug Mode |
Debug Log | Show/Hide Debug Log | |
Visualization and Analysis | Visual Full Tracking | Select key events through visual interface for further analysis |
Web Click Analysis | Visual display of users' click behavior on web pages | |
DeepLink | Create DeepLink for app promotion | |
Advanced Features | Data Encryption | Data is stored and sent after encryption |
Integration between App and H5 | After integration, event data from H5 is stored and sent by the App SDK | |
Compliance | Support compliance requirements | |
SDK Collection Control | Control the SDK to be enabled or disabled |
3. Basic Principles
The Web SDK is written in native JavaScript. It does not use the latest ES6 features. Theoretically, it supports browsers IE6 and later.
The principle of the Web SDK is mainly to monitor clicks and other operations on the page through native JavaScript code, automatically obtain screen width, height, and other properties, and then send requests. Because the Web SDK is based on traditional browser environments, it has nothing to do with frameworks! In other words, the Web SDK can only be used in "web pages running in browsers". Here are a few characteristics:
- Supports JavaScript language environments
- Supports web browser environments
Because it needs to meet the above-mentioned Web + JavaScript environment, we call the SDK Web JS SDK, or Web SDK for short.
4. Plugin Architecture
Because the Web SDK has thousands of functional points, and the number of functional points is still increasing. Due to the large number of functional points and the presence of multiple mutually exclusive solutions for each function, the previous "all-in-one SDK" (integrating all functions together) is gradually transforming into a plugin architecture. Theoretically, all future functions will be implemented through plugins, and previous functions are also gradually being decomposed into plugins.
Given the importance of the plugin, it is recommended to check the existing "Plugin Integration" section in the SDK documentation. Each plugin will have its own readme for instructions.
5. Client Framework Support Scope
Framework | Vue2 | Vue3 | React | Angular |
---|---|---|---|---|
Supported |
Note:
- As mentioned in the basic principles above, as long as it is a standard browser environment that supports native JavaScript, the SDK can be used. It is independent of the framework.
- The SDK does not support some framework-specific features that are not browser-related. For example, React uses JSX, which browsers do not recognize, so the SDK cannot identify it.
- Cross-platform frameworks (such as uni-app and RN) cannot directly use the Web SDK. The Web SDK can be integrated directly into the browser-generated pages of the framework. uni-app, for example, requires the use of the uni-app SDK.
6. Server Framework Support Scope
Framework | next.js | nuxt.js |
---|---|---|
Support |
Note:
- A framework for rendering pages on the server side cannot be directly introduced into the Web SDK. You need to integrate the Web SDK with framework features to make the Web SDK render and run on the client side.
7. Support range of station building system
Framework | wordpress | shopify | ghost | TaoBao |
---|---|---|---|---|
Support |
Note:
- For site building systems, new js files can be introduced (for example, in the generic file header). You can use the Web SDK.
- For the Taobao store system, js files cannot be introduced, so the Web SDK cannot be used.
8. Browsers Supported Range
Browsers | IE6 | IE7 | IE8 | IE9 | IE10 | IE11 | Edge | FireFox | Safari | Chrome | Opera |
---|---|---|---|---|---|---|---|---|---|---|---|
Supported |
Notice:
- The basic principle mentioned above indicates that as long as it is a standard browser environment that supports native JavaScript (ES6 is not required), it can be used. It is unrelated to the operating system, platform type, browser type, and browser version.
- It does not guarantee that some niche browsers have not implemented standard JavaScript, which may result in differences in some attributes. In this case, it is related to the operating system, platform type, browser type, and browser version.
- Some features require relatively new browsers to support, such as batch sending requiring LocalStorage storage.
- If some features (such as bulk sending) are not supported in the version browser, the SDK will not report an error, but will automatically downgrade (using image sending), or remove the feature.
Note: The content of this document is a technical document that provides details on how to use the Sensors product and does not include sales terms; the specific content of enterprise procurement products and technical services shall be subject to the commercial procurement contract.