You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

18 lines
505 B
TypeScript

8 months ago
import { EventTracking } from '@xkit-yx/utils/dist/uniapp'
import imPkg from 'nim-web-sdk-ng/package.json'
export const trackInit = (
component: 'ChatUIKit' | 'ContactUIKit' | 'ConversationUIKit' | 'SearchUIKit'
): void => {
if (uni.$UIKitNIM.options.appkey) {
const eventTracking = new EventTracking({
appKey: uni.$UIKitNIM.options.appkey,
version: '10.2.0',
component,
imVersion: imPkg.version,
platform: 'UniApp',
})
eventTracking.track('init', '')
}
}