加入统计服务

This commit is contained in:
xyf-mac 2021-11-14 18:05:55 +08:00
parent 03fe18e342
commit 85099a9664
2 changed files with 9 additions and 0 deletions

View File

@ -15,6 +15,7 @@
"less": "^4.1.1",
"less-loader": "^7.3.0",
"lodash": "^4.17.21",
"universal-analytics": "^0.4.23",
"uuid": "^8.3.2",
"vue": "^2.6.11",
"vue-class-component": "^7.2.3",

View File

@ -1,5 +1,13 @@
import {Msg, Page, PluginEvent} from "@/core/types";
// @ts-ignore
import * as UA from "universal-analytics"
import {v4} from "uuid"
// 统计服务
const userID = localStorage.getItem("userID") || v4()
UA("UA-134924925-3", userID);
console.log("on background")
class PortMan {