{"id":19411526,"url":"https://github.com/volcengine/datarangers-sdk-javascript","last_synced_at":"2025-04-24T10:33:52.599Z","repository":{"id":76892469,"uuid":"523193466","full_name":"volcengine/datarangers-sdk-javascript","owner":"volcengine","description":"火山引擎数据官方 Web JavaScript 埋点 SDK，用于 Web 端和 H5 端的数据采集埋点 。使用原生 JavaScript 实现代码埋点、全埋点、AB实验、网页热力图等功能。","archived":false,"fork":false,"pushed_at":"2024-04-02T06:21:37.000Z","size":296,"stargazers_count":16,"open_issues_count":0,"forks_count":7,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-04-02T07:34:15.054Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/volcengine.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2022-08-10T03:58:31.000Z","updated_at":"2024-04-02T07:34:17.110Z","dependencies_parsed_at":"2024-04-02T07:44:27.241Z","dependency_job_id":null,"html_url":"https://github.com/volcengine/datarangers-sdk-javascript","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/volcengine%2Fdatarangers-sdk-javascript","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/volcengine%2Fdatarangers-sdk-javascript/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/volcengine%2Fdatarangers-sdk-javascript/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/volcengine%2Fdatarangers-sdk-javascript/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/volcengine","download_url":"https://codeload.github.com/volcengine/datarangers-sdk-javascript/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223950404,"owners_count":17230466,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-10T12:21:51.398Z","updated_at":"2024-11-10T12:21:51.858Z","avatar_url":"https://github.com/volcengine.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"English | [简体中文](./README.zh-CN.md)\n\n# `DataRangers SDK - javascript`\n## Sample\n\n```javascript\nnpm install \nnpm run build\n```\n\n## Sample\n\n### 1. Initialize the SDK in your javascript file\n\n```javascript\nconst SDK = require('@datarangers/sdk-javascript');\n\nSDK.init({\n  app_id: 1234, // Replace it with the \"APP_ID\"\n  channel: 'cn', // Replace it with your report channel\n  log: true, // Whether to print the log\n});\n\nSDK.config({\n  username: 'xxx', // when you want report username with event\n});\n\nSDK.start(); // Setup complete and now events can be sent.\n\n```\n\n### 2. Report custom user behavior events\n\n```javascript\n// Take reporting the \"video clicked\" behavior of users for example\nSDK.event('play_video', {\n  title: 'Here is the video title',\n});\n```\n\n### 3. Report the unique identifier of the currently logged in user\n\n```javascript\n// Set \"user_unique_id\" after a user logs in and the user's unique identifier is retrieved.\n SDK.config({\n    user_unique_id: 'zhangsan', // Unique user identifier\n  });\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvolcengine%2Fdatarangers-sdk-javascript","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvolcengine%2Fdatarangers-sdk-javascript","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvolcengine%2Fdatarangers-sdk-javascript/lists"}