feat: Enhance Amplitude tracking across various components (#29662)

Co-authored-by: CodingOnStar <hanxujiang@dify.ai>
This commit is contained in:
Coding On Star
2025-12-15 15:25:10 +08:00
committed by GitHub
parent 724cd57dbf
commit d942adf3b2
15 changed files with 96 additions and 5 deletions

View File

@@ -21,6 +21,7 @@ import { useDataSourceStore, useDataSourceStoreWithSelector } from '@/app/compon
import { useShallow } from 'zustand/react/shallow'
import { useWorkflowStore } from '@/app/components/workflow/store'
import StepIndicator from './step-indicator'
import { trackEvent } from '@/app/components/base/amplitude'
const Preparation = () => {
const {
@@ -121,6 +122,7 @@ const Preparation = () => {
datasource_type: datasourceType,
datasource_info_list: datasourceInfoList,
})
trackEvent('pipeline_start_action_time', { action_type: 'document_processing' })
setIsPreparingDataSource?.(false)
}, [dataSourceStore, datasource, datasourceType, handleRun, workflowStore])

View File

@@ -47,6 +47,7 @@ import { useModalContextSelector } from '@/context/modal-context'
import Link from 'next/link'
import { useDatasetApiAccessUrl } from '@/hooks/use-api-access-url'
import { useFormatTimeFromNow } from '@/hooks/use-format-time-from-now'
import { trackEvent } from '@/app/components/base/amplitude'
const PUBLISH_SHORTCUT = ['ctrl', '⇧', 'P']
@@ -109,6 +110,7 @@ const Popup = () => {
releaseNotes: params?.releaseNotes || '',
})
setPublished(true)
trackEvent('app_published_time', { action_mode: 'pipeline', app_id: datasetId, app_name: params?.title || '' })
if (res) {
notify({
type: 'success',