🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

@hokdo/core

Package Overview
Dependencies
Maintainers
3
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@hokdo/core

Hokdo Core SDK

latest
npmnpm
Version
1.0.8
Version published
Weekly downloads
8
60%
Maintainers
3
Weekly downloads
 
Created
Source

Hokdo Core SDK

将获客多 SDK 嵌入网页源码,更懂你的客户。

有关 SDK 使用最新内容请参考:获客多 - 文档中心

安装

通过 CDN

在入口 html 中引入 SDK 文件(包含 JS 与 CSS,其中 CSS 文件的引入是必要的)

<link rel="stylesheet" href="https://static.hokdo.com/hokdo-sdk.css" />
<script src="https://static.hokdo.com/hokdo-sdk.js"></script>

通过 NPM

npm i @hokdo/core -S
import Hokdo from '@hokdo/core';
import '@hokdo/core/hokdo-sdk.css';

使用

在希望程序开始运行的阶段执行 init 函数:

Hokdo.init('<token>')

通过 userInfo 属性将用户名等信息传入:

Hokdo.init('<token>', {
  userInfo: {
    name: '<user-name>',
    image: '<user-avatar-url>'
  }
})

示例代码

<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <title>获客多 Hokdo | 客户成功的作战平台</title>
+   <link rel="stylesheet" href="https://static.hokdo.com/hokdo-sdk.css" />
  </head>
  <body>
    <div id="app"></div>
+   <script src="https://static.hokdo.com/hokdo-sdk.js"></script>
+   <script>
+     Hokdo.init("6754f14eed9fccdc618758c24a45cd41", {
+       userInfo: {
+         name: 'SampleName',
+         image: 'sample.jpeg'
+       }
+     })
+   </script>
  </body>
</html>

Keywords

Hokdo

FAQs

Package last updated on 27 Jun 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts