mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-19 19:16:29 +08:00
feat(core): improve mixpanel (#7652)
move @affine/core/utils/mixpanel -> @affine/core/mixpanel now you can debug mixpanel on browser devtool 
This commit is contained in:
@@ -3,7 +3,7 @@ import {
|
||||
pushGlobalLoadingEventAtom,
|
||||
resolveGlobalLoadingEventAtom,
|
||||
} from '@affine/component/global-loading';
|
||||
import { mixpanel } from '@affine/core/utils';
|
||||
import { mixpanel } from '@affine/core/mixpanel';
|
||||
import { apis } from '@affine/electron-api';
|
||||
import { useI18n } from '@affine/i18n';
|
||||
import type { PageRootService, RootBlockModel } from '@blocksuite/blocks';
|
||||
|
||||
@@ -4,9 +4,9 @@ import {
|
||||
PreconditionStrategy,
|
||||
registerAffineCommand,
|
||||
} from '@affine/core/commands';
|
||||
import { mixpanel } from '@affine/core/mixpanel';
|
||||
import { CompatibleFavoriteItemsAdapter } from '@affine/core/modules/properties';
|
||||
import { TelemetryWorkspaceContextService } from '@affine/core/modules/telemetry/services/telemetry';
|
||||
import { mixpanel } from '@affine/core/utils';
|
||||
import { WorkspaceFlavour } from '@affine/env/workspace';
|
||||
import { useI18n } from '@affine/i18n';
|
||||
import { EdgelessIcon, HistoryIcon, PageIcon } from '@blocksuite/icons/rc';
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { notify } from '@affine/component';
|
||||
import { mixpanel } from '@affine/core/mixpanel';
|
||||
import { getAffineCloudBaseUrl } from '@affine/core/modules/cloud/services/fetch';
|
||||
import { mixpanel } from '@affine/core/utils';
|
||||
import { useI18n } from '@affine/i18n';
|
||||
import type { Disposable } from '@blocksuite/global/utils';
|
||||
import { useCallback, useEffect, useMemo, useState } from 'react';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { useUpgradeNotify } from '@affine/core/components/affine/subscription-landing/notify';
|
||||
import { mixpanelTrack } from '@affine/core/utils';
|
||||
import { mixpanel } from '@affine/core/mixpanel';
|
||||
import { SubscriptionPlan, SubscriptionRecurring } from '@affine/graphql';
|
||||
import { nanoid } from 'nanoid';
|
||||
import { useCallback, useEffect } from 'react';
|
||||
@@ -130,7 +130,7 @@ export const useSubscriptionNotifyReader = () => {
|
||||
localStorage.removeItem(localStorageKey);
|
||||
|
||||
// mixpanel
|
||||
mixpanelTrack('PlanChangeSucceeded', {
|
||||
mixpanel.track('PlanChangeSucceeded', {
|
||||
category: recurring,
|
||||
type: plan,
|
||||
control: 'new subscription',
|
||||
|
||||
@@ -7,7 +7,8 @@ import { atomWithObservable, atomWithStorage } from 'jotai/utils';
|
||||
import { useCallback, useState } from 'react';
|
||||
import { Observable } from 'rxjs';
|
||||
|
||||
import { mixpanel, popupWindow } from '../utils';
|
||||
import { mixpanel } from '../mixpanel';
|
||||
import { popupWindow } from '../utils';
|
||||
import { useAsyncCallback } from './affine-async-hooks';
|
||||
|
||||
function rpcToObservable<
|
||||
|
||||
Reference in New Issue
Block a user