feat: Enhance Amplitude tracking across various components (#29662)
Co-authored-by: CodingOnStar <hanxujiang@dify.ai>
This commit is contained in:
@@ -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])
|
||||
|
||||
|
||||
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user