30 lines
1.1 KiB
JavaScript
30 lines
1.1 KiB
JavaScript
function isDingTalk() {
|
|
const userAgent = navigator.userAgent || navigator.vendor || window.opera;
|
|
return /DingTalk/i.test(userAgent);
|
|
}
|
|
|
|
// 初始化google监控
|
|
|
|
(async () => {
|
|
const { initializeApp } = await import('https://www.gstatic.com/firebasejs/11.0.2/firebase-app.js');
|
|
const { getAnalytics } = await import('https://www.gstatic.com/firebasejs/11.0.2/firebase-analytics.js');
|
|
const { getPerformance } = await import("https://www.gstatic.com/firebasejs/11.0.2/firebase-performance.js");
|
|
|
|
const firebaseConfig = {
|
|
apiKey: "AIzaSyDyEB3y1y3cNBX_vQszWWZ28-pH33gk49A",
|
|
authDomain: "clue-a7a8f.firebaseapp.com",
|
|
projectId: "clue-a7a8f",
|
|
storageBucket: "clue-a7a8f.firebasestorage.app",
|
|
messagingSenderId: "1077280881146",
|
|
appId: "1:1077280881146:web:b244d261273b6f3acc0c43",
|
|
measurementId: "G-8KJXRQ4E9N"
|
|
};
|
|
|
|
// Initialize Firebase
|
|
const app = initializeApp(firebaseConfig);
|
|
const analytics = getAnalytics(app);
|
|
const perf = getPerformance(app);
|
|
|
|
window.performance.mark("pageStart");
|
|
})();
|