mirror of
https://github.com/cs-lazy-tools/ChatGPT-On-CS.git
synced 2026-09-21 05:20:32 +08:00
rm: 删除谷歌埋点
This commit is contained in:
@@ -131,7 +131,6 @@
|
||||
"pg-hstore": "^2.3.4",
|
||||
"react": "^18.2.0",
|
||||
"react-dom": "^18.2.0",
|
||||
"react-ga4": "^2.1.0",
|
||||
"react-hook-form": "^7.50.1",
|
||||
"react-icons": "^5.0.1",
|
||||
"react-markdown": "^9.0.1",
|
||||
|
||||
Generated
-7
@@ -119,9 +119,6 @@ dependencies:
|
||||
react-dom:
|
||||
specifier: ^18.2.0
|
||||
version: 18.3.0(react@18.3.0)
|
||||
react-ga4:
|
||||
specifier: ^2.1.0
|
||||
version: 2.1.0
|
||||
react-hook-form:
|
||||
specifier: ^7.50.1
|
||||
version: 7.51.3(react@18.3.0)
|
||||
@@ -12383,10 +12380,6 @@ packages:
|
||||
use-sidecar: 1.1.2(@types/react@18.3.0)(react@18.3.0)
|
||||
dev: false
|
||||
|
||||
/react-ga4@2.1.0:
|
||||
resolution: {integrity: sha512-ZKS7PGNFqqMd3PJ6+C2Jtz/o1iU9ggiy8Y8nUeksgVuvNISbmrQtJiZNvC/TjDsqD0QlU5Wkgs7i+w9+OjHhhQ==}
|
||||
dev: false
|
||||
|
||||
/react-hook-form@7.51.3(react@18.3.0):
|
||||
resolution: {integrity: sha512-cvJ/wbHdhYx8aviSWh28w9ImjmVsb5Y05n1+FW786vEZQJV5STNM0pW6ujS+oiBecb0ARBxJFyAnXj9+GHXACQ==}
|
||||
engines: {node: '>=12.22.0'}
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title>懒人客服</title>
|
||||
<script defer src="https://anl.wizgadg.top/script.js" data-website-id="eb4d2b94-6054-454d-8369-d4f443f75a99"></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
@@ -1,10 +1,7 @@
|
||||
import React from 'react';
|
||||
import { createRoot } from 'react-dom/client';
|
||||
import ReactGA from 'react-ga4';
|
||||
import App from './App';
|
||||
import { trackingID } from './services/analytics';
|
||||
|
||||
ReactGA.initialize(trackingID);
|
||||
const container = document.getElementById('root') as HTMLElement;
|
||||
const root = createRoot(container);
|
||||
root.render(
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import React, { useState } from 'react';
|
||||
import React, { useState, useEffect } from 'react';
|
||||
import {
|
||||
Box,
|
||||
Button,
|
||||
@@ -17,6 +17,7 @@ import {
|
||||
import PageContainer from '../../components/PageContainer';
|
||||
import Markdown from '../../components/Markdown';
|
||||
import { getVersionInfo } from '../../services/system/controller';
|
||||
import { trackPageView } from '../../services/analytics';
|
||||
|
||||
const AboutPage: React.FC = () => {
|
||||
const toast = useToast();
|
||||
@@ -55,6 +56,10 @@ const AboutPage: React.FC = () => {
|
||||
}
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
trackPageView('AboutPage');
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<PageContainer>
|
||||
<VStack>
|
||||
|
||||
@@ -39,6 +39,7 @@ import {
|
||||
getPlatformList,
|
||||
exportMessageExcel,
|
||||
} from '../../services/platform/controller';
|
||||
import { trackPageView } from '../../services/analytics';
|
||||
|
||||
const ChatSessionsTable = () => {
|
||||
const toast = useToast();
|
||||
@@ -57,6 +58,10 @@ const ChatSessionsTable = () => {
|
||||
const [updated, setUpdated] = useState(false);
|
||||
const itemsPerPage = 10; // 每一页显示的条数
|
||||
|
||||
useEffect(() => {
|
||||
trackPageView('ChatSessionsTable');
|
||||
}, []);
|
||||
|
||||
useEffect(() => {
|
||||
const fetchSessions = async () => {
|
||||
try {
|
||||
|
||||
@@ -12,6 +12,7 @@ import {
|
||||
import { AddIcon } from '@chakra-ui/icons';
|
||||
import InstanceCardComponent from './InstanceCardComponent';
|
||||
import { useAppManager } from './AppManagerContext';
|
||||
import { trackButtonClick } from '../../../services/analytics';
|
||||
|
||||
const InstanceListComponent = () => {
|
||||
const {
|
||||
@@ -37,6 +38,7 @@ const InstanceListComponent = () => {
|
||||
|
||||
const handleAddTaskWrapper = async () => {
|
||||
try {
|
||||
trackButtonClick(`add_task_${selectedAppId || ''}`);
|
||||
await handleAddTask();
|
||||
} catch (error) {
|
||||
toast({
|
||||
|
||||
@@ -17,7 +17,6 @@ import LogBox from './LogBox';
|
||||
|
||||
const HomePage = () => {
|
||||
useEffect(() => {
|
||||
// 页面访问埋点
|
||||
trackPageView('Home');
|
||||
}, []);
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import React from 'react';
|
||||
import React, { useEffect } from 'react';
|
||||
import {
|
||||
ChakraProvider,
|
||||
Flex,
|
||||
@@ -12,8 +12,13 @@ import AccountSettings from '../../components/Settings/AccountSettings';
|
||||
import GeneralSettings from '../../components/Settings/GeneralSettings';
|
||||
import LLMSettings from '../../components/Settings/LLMSettings';
|
||||
import PluginSettings from '../../components/Settings/PluginSettings';
|
||||
import { trackPageView } from '../../services/analytics';
|
||||
|
||||
const SettingsPage = () => {
|
||||
useEffect(() => {
|
||||
trackPageView('Settings');
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<ChakraProvider>
|
||||
<Flex direction="column" height="70vh">
|
||||
|
||||
@@ -1,16 +1,11 @@
|
||||
import ua from 'universal-analytics';
|
||||
|
||||
// 这里使用了 Google Analytics 的跟踪 ID,如果不使用,可以直接注释掉相关代码,Mock 掉相关函数
|
||||
const trackingID = 'UA-XXXXXXXXX-X';
|
||||
const visitor = ua(trackingID);
|
||||
|
||||
/* eslint-disable @typescript-eslint/no-unused-vars */
|
||||
export function sendEvent(
|
||||
category: string,
|
||||
action: string,
|
||||
label: string,
|
||||
value: string | number,
|
||||
) {
|
||||
visitor.event(category, action, label, value).send();
|
||||
// visitor.event(category, action, label, value).send();
|
||||
}
|
||||
|
||||
// 预制事件:打开按钮
|
||||
|
||||
Reference in New Issue
Block a user