@churnassin/哨兵-猎鹰
国家防范机制正式装载器 哨兵灯塔 财务报告和审定财务报表 哨兵小组 用于跟踪的代理 楚恩刺客。 。 。 .
此轻量级模块允许您从您的前端 JavaScript app (React, Vue等) 中初始化客户活动跟踪,而无需手动嵌入 <script> 标签.
* 安装
npm install @churnassassin/sentry-beacon
使用量
导入并初始化您前端app中的信标( 例如 React, Vue, plain JS):
import { initSentryBeacon } from '@churnassassin/sentry-beacon'
initSentryBeacon({
token: "[Provided By Churn Assassin]",
useragent: navigator.userAgent,
activity: window.location.pathname, // or other variable containing the event
qs: window.location.search, // or other variable containing event details
company_name: 'ABC-123', // Alpha-numeric company name
companyid: 'ABC-123', // Alpha-numeric company id
enduser_email: '[email protected]', // email of end user logged into your app
enduser_firstname: 'Jane', // first name of end user logged into your app
enduser_lastname: 'Doe', // last name of end user logged into your app
enduserid: 'user-789', // unique id of end user logged into your app
productid: '1', // Numeric, default: 1
platformid: '2' // Numeric, default: 2
})
~ 做什麽 ~
当调用时, 此函数 :
- 指定全局性
window.assassindata对象,包含所有用户/会话元数据. - 注入哨塔脚本 :
https://api.churnassassin.com/static/js/churnassassin.js - 注入哨兵面板脚本( 可选的 UI 模块) :
https://api.churnassassin.com/static/js/engagement.js
这些脚本然后开始向Churn刺客报告你的应用中的使用和约定活动.
页:1
- 确保
token和用户专用字段根据当前登录的用户动态注入. - 脚本每页负载只注射一次(重复保护是内置的).
- 此模块仅意在浏览器中运行(不是SSR).
- SPA's(单页应用程序): 应当使用自定义路由器来填充 [活 和 [qs] 属性
++ 辅助
需要帮忙吗? 电子邮件 支持@churnassassin.com 或者联系你的登机专家.
许可证
麻省理工学院 布莱恩·波拉克夫/丘恩刺客