feat: 更新版本号
中文文档
This is TLS JS SDK for browser.
TLS is short for Tinder Log Service.
npm install -S @volcengine/tls-js-sdk
Import in the module file
import { WebTrackerBrowser } from '@volcengine/tls-js-sdk'; const wtb = new WebTrackerBrowser({ host: 'your host', projectId: 'your projectId', topicId: 'your topicId', });
Import directly in the browser
<html> <head></head> <body> <script src="path/to/tls-js-sdk/dist/tls_browser.js"></script> <script> const wtb = new TLS_Browser.WebTrackerBrowser({ host: 'your host', projectId: 'your projectId', topicId: 'your topicId', }); </script> </body> </html>
Class for web tracker in browser
import { WebTrackerBrowser } from '@volcengine/tls-js-sdk'; const wtb = new WebTrackerBrowser({ host: 'your host', // required projectId: 'your projectId', // required topicId: 'yourt topicId', // required protocol: 'your protocol', // optional.The default value is https time: 'batch log time interval', // optional.The default value is 10s. count: 'batch log limit', // optional.The default value is 10. source: 'log source', // optional. });
WebTrackerBrowser instance method below.
send(data)
wtb.send({ key: 'value', // custom key/value });
sendImmediate(data)
wtb.sendImmediate({ key: 'value', // custom key/value });
sendBatchLogs(data)
wtb.sendBatchLogs([{ key: 'value' }]);
sendBatchLogsImmediate(data)
wtb.sendBatchLogsImmediate([{ key: 'value' }])
If you discover a potential security issue in this project, or think you may have discovered a security issue, we ask that you notify Bytedance Security via our security center or vulnerability reporting email.
Please do not create a public GitHub issue.
This project is licensed under the MIT License.
版权所有:中国计算机学会技术支持:开源发展技术委员会 京ICP备13000930号-9 京公网安备 11010802032778号
TLS JS SDK
中文文档
This is TLS JS SDK for browser.
Installation
Basic Usage
Import in the module file
Import directly in the browser
API
WebTrackerBrowser
Class for web tracker in browser
WebTrackerBrowser instance method below.
send
send(data)
sendImmediate
sendImmediate(data)
sendBatchLogs
sendBatchLogs(data)
sendBatchLogsImmediate
sendBatchLogsImmediate(data)
Security
If you discover a potential security issue in this project, or think you may have discovered a security issue, we ask that you notify Bytedance Security via our security center or vulnerability reporting email.
Please do not create a public GitHub issue.
License
This project is licensed under the MIT License.