制作浏览器指纹的网站访问者标识符 . 与饼干和本地存储不同,指纹在隐形/私人模式中保持不变,甚至在浏览器数据被清洗时也是如此. 提供与开源指纹JS相比的额外信息和更高的准确性.
快开始
获取亲密钥 :
- 在 仪表板.指印.com/签名 (有免费的审判)
- 注册后去 仪表板 并选择创建的订阅
- 访问页面左侧导航侧栏中的“ API 键” 页面
- 用“ 公用” 类型复制密钥
从国家预防机制安装
npm i @fingerprint/agent
# or
yarn add @fingerprint/agent
# or
pnpm add @fingerprint/agent
# or
bun add @fingerprint/agent
import Fingerprint from '@fingerprint/agent'
// Initialize an agent at application startup.
const fpPromise = Fingerprint.start({ apiKey: 'your-pro-key' })
;(async () => {
// Get the visitor identifier when you need it.
const fp = await fpPromise
const result = await fp.get()
// This is the visitor identifier:
const visitorId = result.visitorId
console.log(visitorId)
})()
或者从 CDN 安装
<script>
// Initialize the agent at application startup.
const fpPromise = import('https://fpjscdn.net/v4/your-pro-key')
.then(FingerprintJS => FingerprintJS.start())
// Get the visitor identifier when you need it.
fpPromise
.then(fp => fp.get())
.then(result => {
// This is the visitor identifier:
const visitorId = result.visitorId
console.log(visitorId)
})
</script>
注意您需要替换 your-pro-key 带有 API 公共密钥 仪表板。 。 。 .
另见
🍿 现场演示
⬆️ 如何从指纹版本 3 迁移
📕 指纹文件