@levi-gemcommerce/analytics 1.0.0-dev.21 → 1.0.0-dev.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/api/graphql/fragments/pathAnalytic.generated.d.ts +25 -0
- package/dist/esm/components/CardPathAnalysis/CardJourneyAnalysis.d.ts +7 -0
- package/dist/esm/components/CardPathAnalysis/components/CardPathAnalysis/CardAnalyticEmpty.d.ts +8 -0
- package/dist/esm/components/CardPathAnalysis/components/CardPathAnalysis/CardPathAnalysis.d.ts +15 -0
- package/dist/esm/components/CardPathAnalysis/components/CardPathAnalysis/CardPathAnalysisContent.d.ts +6 -0
- package/dist/esm/components/CardPathAnalysis/components/CardPathAnalysis/CardPathAnalysisEmpty.d.ts +5 -0
- package/dist/esm/components/CardPathAnalysis/components/CardPathAnalysis/CardPathAnalysisSkeleton.d.ts +1 -0
- package/dist/esm/components/CardPathAnalysis/components/CardPathAnalysis/CardPathAnalysisWrapper.d.ts +13 -0
- package/dist/esm/components/CardPathAnalysis/components/CardPathAnalysis/index.d.ts +1 -0
- package/dist/esm/components/CardPathAnalysis/components/PathAnalysisChart.d.ts +7 -0
- package/dist/esm/components/CardPathAnalysis/components/index.d.ts +1 -0
- package/dist/esm/components/CardPathAnalysis/configs/index.d.ts +2 -0
- package/dist/esm/components/CardPathAnalysis/constants/index.d.ts +1 -0
- package/dist/esm/components/CardPathAnalysis/constants/path-analysis.d.ts +73 -0
- package/dist/esm/components/CardPathAnalysis/contexts/PathAnalysisProvider.d.ts +56 -0
- package/dist/esm/components/CardPathAnalysis/contexts/index.d.ts +1 -0
- package/dist/esm/components/CardPathAnalysis/helpers/index.d.ts +2 -0
- package/dist/esm/components/CardPathAnalysis/helpers/metricHelpers.d.ts +16 -0
- package/dist/esm/components/CardPathAnalysis/helpers/pathAnalysis.d.ts +12 -0
- package/dist/esm/components/CardPathAnalysis/helpers/pathAnalysisChart.d.ts +17 -0
- package/dist/esm/components/CardPathAnalysis/helpers/treeUtils.d.ts +7 -0
- package/dist/esm/components/CardPathAnalysis/hooks/usePathAnalysisChart.d.ts +15 -0
- package/dist/esm/components/CardPathAnalysis/hooks/usePathAnalysisFunnel.d.ts +21 -0
- package/dist/esm/components/CardPathAnalysis/hooks/usePathAnalysisHeatmap.d.ts +4 -0
- package/dist/esm/components/CardPathAnalysis/hooks/usePathAnalyticsMerger.d.ts +10 -0
- package/dist/esm/components/CardPathAnalysis/index.d.ts +4 -0
- package/dist/esm/components/CardPathAnalysis/stores/funnel-chart.d.ts +12 -0
- package/dist/esm/components/CardPathAnalysis/stores/index.d.ts +3 -0
- package/dist/esm/components/CardPathAnalysis/stores/path-analysis-campaign.d.ts +10 -0
- package/dist/esm/components/CardPathAnalysis/stores/path-analysis.d.ts +6 -0
- package/dist/esm/components/CardPathAnalysis/types/index.d.ts +1 -0
- package/dist/esm/components/CardPathAnalysis/types/path-analysis.d.ts +6 -0
- package/dist/esm/gemxql.js +63 -0
- package/dist/esm/gemxql.mjs +63 -0
- package/dist/esm/index.js +145 -1
- package/dist/esm/index.mjs +145 -1
- package/dist/esm/modules/analytics/index.d.ts +14 -0
- package/dist/esm/modules/analytics/types.d.ts +23 -0
- package/dist/esm/modules/apps/index.d.ts +4 -0
- package/dist/esm/modules/heatmap/hooks/useHeatmapModalMonitor.d.ts +3 -0
- package/dist/esm/modules/heatmap/index.d.ts +7 -0
- package/dist/esm/modules/heatmap/types/index.d.ts +33 -0
- package/dist/esm/modules/page-analytic/index.d.ts +13 -0
- package/dist/esm/modules/page-analytic/modules/analytic/index.d.ts +5 -0
- package/dist/esm/modules/shopify/index.d.ts +6 -0
- package/dist/esm/providers/PricingProvider.d.ts +51 -0
- package/dist/esm/providers/index.d.ts +2 -0
- package/dist/esm/shared/components/GBox/GBox.d.ts +9 -0
- package/dist/esm/shared/components/GBox/index.d.ts +1 -0
- package/dist/esm/shared/components/GFeatureLocked/GFeatureLocked.d.ts +14 -0
- package/dist/esm/shared/components/GFeatureLocked/constants.d.ts +3 -0
- package/dist/esm/shared/components/GFeatureLocked/index.d.ts +2 -0
- package/dist/esm/shared/components/GFeatureLocked/types.d.ts +15 -0
- package/dist/esm/shared/components/index.d.ts +2 -0
- package/dist/esm/types/index.d.ts +1 -0
- package/dist/esm/types/metric.d.ts +17 -1
- package/dist/esm/types/pricing.d.ts +33 -0
- package/dist/esm/types/template.d.ts +19 -0
- package/dist/esm/types.js +39 -1
- package/dist/esm/types.mjs +39 -1
- package/dist/esm/utils/deep-copy.d.ts +1 -0
- package/dist/esm/utils/index.d.ts +2 -0
- package/dist/esm/utils/template-type.d.ts +2 -0
- package/dist/style.css +1 -1
- package/dist/umd/esm/api/graphql/fragments/pathAnalytic.generated.d.ts +25 -0
- package/dist/umd/esm/components/CardPathAnalysis/CardJourneyAnalysis.d.ts +7 -0
- package/dist/umd/esm/components/CardPathAnalysis/components/CardPathAnalysis/CardAnalyticEmpty.d.ts +8 -0
- package/dist/umd/esm/components/CardPathAnalysis/components/CardPathAnalysis/CardPathAnalysis.d.ts +15 -0
- package/dist/umd/esm/components/CardPathAnalysis/components/CardPathAnalysis/CardPathAnalysisContent.d.ts +6 -0
- package/dist/umd/esm/components/CardPathAnalysis/components/CardPathAnalysis/CardPathAnalysisEmpty.d.ts +5 -0
- package/dist/umd/esm/components/CardPathAnalysis/components/CardPathAnalysis/CardPathAnalysisSkeleton.d.ts +1 -0
- package/dist/umd/esm/components/CardPathAnalysis/components/CardPathAnalysis/CardPathAnalysisWrapper.d.ts +13 -0
- package/dist/umd/esm/components/CardPathAnalysis/components/CardPathAnalysis/index.d.ts +1 -0
- package/dist/umd/esm/components/CardPathAnalysis/components/PathAnalysisChart.d.ts +7 -0
- package/dist/umd/esm/components/CardPathAnalysis/components/index.d.ts +1 -0
- package/dist/umd/esm/components/CardPathAnalysis/configs/index.d.ts +2 -0
- package/dist/umd/esm/components/CardPathAnalysis/constants/index.d.ts +1 -0
- package/dist/umd/esm/components/CardPathAnalysis/constants/path-analysis.d.ts +73 -0
- package/dist/umd/esm/components/CardPathAnalysis/contexts/PathAnalysisProvider.d.ts +56 -0
- package/dist/umd/esm/components/CardPathAnalysis/contexts/index.d.ts +1 -0
- package/dist/umd/esm/components/CardPathAnalysis/helpers/index.d.ts +2 -0
- package/dist/umd/esm/components/CardPathAnalysis/helpers/metricHelpers.d.ts +16 -0
- package/dist/umd/esm/components/CardPathAnalysis/helpers/pathAnalysis.d.ts +12 -0
- package/dist/umd/esm/components/CardPathAnalysis/helpers/pathAnalysisChart.d.ts +17 -0
- package/dist/umd/esm/components/CardPathAnalysis/helpers/treeUtils.d.ts +7 -0
- package/dist/umd/esm/components/CardPathAnalysis/hooks/usePathAnalysisChart.d.ts +15 -0
- package/dist/umd/esm/components/CardPathAnalysis/hooks/usePathAnalysisFunnel.d.ts +21 -0
- package/dist/umd/esm/components/CardPathAnalysis/hooks/usePathAnalysisHeatmap.d.ts +4 -0
- package/dist/umd/esm/components/CardPathAnalysis/hooks/usePathAnalyticsMerger.d.ts +10 -0
- package/dist/umd/esm/components/CardPathAnalysis/index.d.ts +4 -0
- package/dist/umd/esm/components/CardPathAnalysis/stores/funnel-chart.d.ts +12 -0
- package/dist/umd/esm/components/CardPathAnalysis/stores/index.d.ts +3 -0
- package/dist/umd/esm/components/CardPathAnalysis/stores/path-analysis-campaign.d.ts +10 -0
- package/dist/umd/esm/components/CardPathAnalysis/stores/path-analysis.d.ts +6 -0
- package/dist/umd/esm/components/CardPathAnalysis/types/index.d.ts +1 -0
- package/dist/umd/esm/components/CardPathAnalysis/types/path-analysis.d.ts +6 -0
- package/dist/umd/esm/modules/analytics/index.d.ts +14 -0
- package/dist/umd/esm/modules/analytics/types.d.ts +23 -0
- package/dist/umd/esm/modules/apps/index.d.ts +4 -0
- package/dist/umd/esm/modules/heatmap/hooks/useHeatmapModalMonitor.d.ts +3 -0
- package/dist/umd/esm/modules/heatmap/index.d.ts +7 -0
- package/dist/umd/esm/modules/heatmap/types/index.d.ts +33 -0
- package/dist/umd/esm/modules/page-analytic/index.d.ts +13 -0
- package/dist/umd/esm/modules/page-analytic/modules/analytic/index.d.ts +5 -0
- package/dist/umd/esm/modules/shopify/index.d.ts +6 -0
- package/dist/umd/esm/providers/PricingProvider.d.ts +51 -0
- package/dist/umd/esm/providers/index.d.ts +2 -0
- package/dist/umd/esm/shared/components/GBox/GBox.d.ts +9 -0
- package/dist/umd/esm/shared/components/GBox/index.d.ts +1 -0
- package/dist/umd/esm/shared/components/GFeatureLocked/GFeatureLocked.d.ts +14 -0
- package/dist/umd/esm/shared/components/GFeatureLocked/constants.d.ts +3 -0
- package/dist/umd/esm/shared/components/GFeatureLocked/index.d.ts +2 -0
- package/dist/umd/esm/shared/components/GFeatureLocked/types.d.ts +15 -0
- package/dist/umd/esm/shared/components/index.d.ts +2 -0
- package/dist/umd/esm/types/index.d.ts +1 -0
- package/dist/umd/esm/types/metric.d.ts +17 -1
- package/dist/umd/esm/types/pricing.d.ts +33 -0
- package/dist/umd/esm/types/template.d.ts +19 -0
- package/dist/umd/esm/utils/deep-copy.d.ts +1 -0
- package/dist/umd/esm/utils/index.d.ts +2 -0
- package/dist/umd/esm/utils/template-type.d.ts +2 -0
- package/dist/umd/gemxql.js +1 -1
- package/dist/umd/index.js +1 -1
- package/dist/umd/types.js +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export type PathAnalyticMetricSelectFragment = {
|
|
2
|
+
totalPageViewed?: number | null;
|
|
3
|
+
totalVisitors?: number | null;
|
|
4
|
+
totalClicked?: number | null;
|
|
5
|
+
totalAddedToCart?: number | null;
|
|
6
|
+
totalReachedCheckout?: number | null;
|
|
7
|
+
totalOrders?: number | null;
|
|
8
|
+
totalSessions?: number | null;
|
|
9
|
+
totalSessionsThatCompletedCheckout?: number | null;
|
|
10
|
+
totalSessionsThatReachedCheckout?: number | null;
|
|
11
|
+
totalSessionsWithCartAdditions?: number | null;
|
|
12
|
+
totalClickedHasHref?: number | null;
|
|
13
|
+
totalSessionsWithoutAction?: number | null;
|
|
14
|
+
totalContinuationSession?: number | null;
|
|
15
|
+
};
|
|
16
|
+
export type PathAnalyticPageSelectFragment = {
|
|
17
|
+
level?: number | null;
|
|
18
|
+
locationPath?: string | null;
|
|
19
|
+
id: string;
|
|
20
|
+
parentID: string;
|
|
21
|
+
pageType?: string | null;
|
|
22
|
+
shopifyPageID?: string | null;
|
|
23
|
+
pageTitle?: string | null;
|
|
24
|
+
metric?: PathAnalyticMetricSelectFragment | null;
|
|
25
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { CardPathAnalysisProps } from './components';
|
|
2
|
+
import { EAnalyticMode } from '@/types';
|
|
3
|
+
interface IProps extends CardPathAnalysisProps {
|
|
4
|
+
analyticMode: EAnalyticMode;
|
|
5
|
+
}
|
|
6
|
+
export declare const CardJourneyAnalysis: ({ analyticMode, ...props }: IProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export {};
|
package/dist/esm/components/CardPathAnalysis/components/CardPathAnalysis/CardPathAnalysis.d.ts
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { IFunnelChartColors } from '@/shared/charts';
|
|
2
|
+
import type { EAnalyticMode } from '@/types';
|
|
3
|
+
import type { IAnalyticsData, ICampaignPathsData } from '../../contexts';
|
|
4
|
+
export interface CardPathAnalysisProps {
|
|
5
|
+
analyticMode: EAnalyticMode;
|
|
6
|
+
funnelColors?: IFunnelChartColors;
|
|
7
|
+
children?: React.ReactNode;
|
|
8
|
+
campaignID?: string;
|
|
9
|
+
campaignGroupID?: string;
|
|
10
|
+
campaignVariantID?: string;
|
|
11
|
+
campaignVersionID?: string;
|
|
12
|
+
campaignPathsData?: ICampaignPathsData;
|
|
13
|
+
analyticsData?: IAnalyticsData;
|
|
14
|
+
}
|
|
15
|
+
export declare const CardPathAnalysis: React.FC<CardPathAnalysisProps>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const CardPathAnalysisSkeleton: React.FC;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { EAnalyticMode } from '@/types';
|
|
2
|
+
import type { IAnalyticsData, ICampaignPathsData } from '../../contexts';
|
|
3
|
+
export interface CardPathAnalysisWrapperProps {
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
campaignID?: string;
|
|
6
|
+
campaignGroupID?: string;
|
|
7
|
+
campaignVariantID?: string;
|
|
8
|
+
campaignVersionID?: string;
|
|
9
|
+
analyticMode: EAnalyticMode;
|
|
10
|
+
campaignPathsData?: ICampaignPathsData;
|
|
11
|
+
analyticsData?: IAnalyticsData;
|
|
12
|
+
}
|
|
13
|
+
export declare const CardPathAnalysisWrapper: React.FC<CardPathAnalysisWrapperProps>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './CardPathAnalysis';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './CardPathAnalysis';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './path-analysis';
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
export declare const FUNNEL_POPOVER_KEY: {
|
|
2
|
+
readonly LEVEL_1: "LEVEL_1";
|
|
3
|
+
readonly LEVEL_2: "LEVEL_2";
|
|
4
|
+
readonly LEVEL_3: "LEVEL_3";
|
|
5
|
+
readonly LEVEL_4: "LEVEL_4";
|
|
6
|
+
readonly LEVEL_5: "LEVEL_5";
|
|
7
|
+
readonly LEVEL_6: "LEVEL_6";
|
|
8
|
+
readonly LEVEL_7: "LEVEL_7";
|
|
9
|
+
readonly ADD_LEVEL: "ADD_LEVEL";
|
|
10
|
+
};
|
|
11
|
+
export declare const MOCK_DATA_PATH_ANALYSIS: ({
|
|
12
|
+
data: ({
|
|
13
|
+
value: number;
|
|
14
|
+
key: string;
|
|
15
|
+
id: string;
|
|
16
|
+
chartTooltip: {
|
|
17
|
+
key: string;
|
|
18
|
+
value: string;
|
|
19
|
+
}[];
|
|
20
|
+
labelTooltip?: undefined;
|
|
21
|
+
} | {
|
|
22
|
+
value: number;
|
|
23
|
+
key: string;
|
|
24
|
+
labelTooltip: {
|
|
25
|
+
title: string;
|
|
26
|
+
content: string;
|
|
27
|
+
};
|
|
28
|
+
id?: undefined;
|
|
29
|
+
chartTooltip?: undefined;
|
|
30
|
+
})[];
|
|
31
|
+
name: string;
|
|
32
|
+
metadata: {
|
|
33
|
+
trends: {
|
|
34
|
+
'0': {
|
|
35
|
+
value: string;
|
|
36
|
+
trend: string;
|
|
37
|
+
direction: string;
|
|
38
|
+
};
|
|
39
|
+
'1': {
|
|
40
|
+
value: string;
|
|
41
|
+
trend: string;
|
|
42
|
+
direction: string;
|
|
43
|
+
};
|
|
44
|
+
'2': {
|
|
45
|
+
value: string;
|
|
46
|
+
trend: string;
|
|
47
|
+
direction: string;
|
|
48
|
+
};
|
|
49
|
+
'3': {
|
|
50
|
+
value: string;
|
|
51
|
+
trend: string;
|
|
52
|
+
direction: string;
|
|
53
|
+
};
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
isComparison?: undefined;
|
|
57
|
+
} | {
|
|
58
|
+
name: string;
|
|
59
|
+
data: ({
|
|
60
|
+
value: number;
|
|
61
|
+
key: string;
|
|
62
|
+
labelTooltip?: undefined;
|
|
63
|
+
} | {
|
|
64
|
+
value: number;
|
|
65
|
+
key: string;
|
|
66
|
+
labelTooltip: {
|
|
67
|
+
title: string;
|
|
68
|
+
content: string;
|
|
69
|
+
};
|
|
70
|
+
})[];
|
|
71
|
+
isComparison: boolean;
|
|
72
|
+
metadata?: undefined;
|
|
73
|
+
})[];
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import type { OnChangeFunnelType } from '@/shared/charts';
|
|
2
|
+
import type { EAnalyticMode } from '@/types';
|
|
3
|
+
import type { IBasePathAnalyticPageWithChild, IBasePathAnalyticPageWithParent } from '../types';
|
|
4
|
+
export interface IPathAnalysisFirstLevel {
|
|
5
|
+
id: string;
|
|
6
|
+
locationPath: string;
|
|
7
|
+
pageTitle: string;
|
|
8
|
+
pageType: string;
|
|
9
|
+
parentID: string;
|
|
10
|
+
level: number;
|
|
11
|
+
metric: {
|
|
12
|
+
totalSessions: number;
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
export interface ICampaignPathsData {
|
|
16
|
+
paths?: IPathAnalysisFirstLevel[];
|
|
17
|
+
isLoading?: boolean;
|
|
18
|
+
}
|
|
19
|
+
export interface IAnalyticsData {
|
|
20
|
+
pathAnalytics?: IBasePathAnalyticPageWithParent[];
|
|
21
|
+
previousPathAnalyticsMap?: Record<string, IBasePathAnalyticPageWithParent>;
|
|
22
|
+
isLoading?: boolean;
|
|
23
|
+
}
|
|
24
|
+
export interface PathAnalysisType {
|
|
25
|
+
mode: EAnalyticMode;
|
|
26
|
+
campaignID?: string;
|
|
27
|
+
campaignGroupID?: string;
|
|
28
|
+
campaignVariantID?: string;
|
|
29
|
+
campaignVersionID?: string;
|
|
30
|
+
pathAnalytics?: IBasePathAnalyticPageWithParent[];
|
|
31
|
+
isLoadingMetric: boolean;
|
|
32
|
+
pageWithMetric: IBasePathAnalyticPageWithChild | undefined;
|
|
33
|
+
dynamicLevels: IBasePathAnalyticPageWithChild[];
|
|
34
|
+
nextLevelPages: IBasePathAnalyticPageWithChild[];
|
|
35
|
+
previousPathAnalyticsMap: Record<string, IBasePathAnalyticPageWithParent>;
|
|
36
|
+
handleAddNextLevel: (childId: string) => void;
|
|
37
|
+
handleChangeLevel: OnChangeFunnelType;
|
|
38
|
+
getPagesByParentID: (data: {
|
|
39
|
+
level?: number;
|
|
40
|
+
parentID?: string;
|
|
41
|
+
}) => IBasePathAnalyticPageWithChild[];
|
|
42
|
+
handleDeleteLevel: (id?: string) => void;
|
|
43
|
+
}
|
|
44
|
+
export interface PathAnalysisProviderProps {
|
|
45
|
+
children: React.ReactNode;
|
|
46
|
+
campaignID?: string;
|
|
47
|
+
campaignGroupID?: string;
|
|
48
|
+
campaignVariantID?: string;
|
|
49
|
+
campaignVersionID?: string;
|
|
50
|
+
mode: EAnalyticMode;
|
|
51
|
+
campaignPathsData?: ICampaignPathsData;
|
|
52
|
+
analyticsData?: IAnalyticsData;
|
|
53
|
+
}
|
|
54
|
+
export declare const PathAnalysisContext: import("react").Context<PathAnalysisType | undefined>;
|
|
55
|
+
export declare const PathAnalysisProvider: (props: PathAnalysisProviderProps) => import("react/jsx-runtime").JSX.Element;
|
|
56
|
+
export declare const usePathAnalysisContext: () => PathAnalysisType;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './PathAnalysisProvider';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { IBasePageAnalyticMetric } from '@/types/metric';
|
|
2
|
+
export declare const getTotalSessionWithCartAdditionMetric: ({ metric }: {
|
|
3
|
+
metric?: IBasePageAnalyticMetric;
|
|
4
|
+
}) => {
|
|
5
|
+
value: number | undefined;
|
|
6
|
+
};
|
|
7
|
+
export declare const getTotalSessionReachedCheckoutMetric: ({ metric }: {
|
|
8
|
+
metric?: IBasePageAnalyticMetric;
|
|
9
|
+
}) => {
|
|
10
|
+
value: number | undefined;
|
|
11
|
+
};
|
|
12
|
+
export declare const getTotalSessionCompletedCheckoutMetric: ({ metric }: {
|
|
13
|
+
metric?: IBasePageAnalyticMetric;
|
|
14
|
+
}) => {
|
|
15
|
+
value: number | undefined;
|
|
16
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { IBasePathAnalyticPageWithChild, IBasePathAnalyticPageWithParent } from '../types';
|
|
2
|
+
import type { IGetTextPrice } from '@/modules/shopify';
|
|
3
|
+
export declare const processPathAnalytics: (analyticsData: IBasePathAnalyticPageWithParent[] | undefined, locationPath: string) => IBasePathAnalyticPageWithChild | undefined;
|
|
4
|
+
export declare const processPathAnalyticsTree: (analyticsData: IBasePathAnalyticPageWithParent[] | undefined) => IBasePathAnalyticPageWithChild[] | undefined;
|
|
5
|
+
export declare const getFunnelChildrenPages: (page: IBasePathAnalyticPageWithChild | undefined) => IBasePathAnalyticPageWithChild[];
|
|
6
|
+
export declare const getFunnelChartTooltip: (data: {
|
|
7
|
+
page?: IBasePathAnalyticPageWithChild;
|
|
8
|
+
getTextPrice: IGetTextPrice;
|
|
9
|
+
}) => {
|
|
10
|
+
key: string;
|
|
11
|
+
value: string;
|
|
12
|
+
}[];
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { TrendIndicatorProps } from '@shopify/polaris-viz';
|
|
2
|
+
import type { IBasePathAnalyticPageWithChild } from '../types';
|
|
3
|
+
export declare const calculateFunnelTrendChange: ({ currentValue, previousValue, }: {
|
|
4
|
+
currentValue?: number;
|
|
5
|
+
previousValue?: number;
|
|
6
|
+
}) => TrendIndicatorProps;
|
|
7
|
+
export declare const calculateFirstLevelTrend: ({ pageWithMetric, previousPathAnalyticsMap, }: {
|
|
8
|
+
pageWithMetric?: IBasePathAnalyticPageWithChild;
|
|
9
|
+
previousPathAnalyticsMap: Record<string, IBasePathAnalyticPageWithChild>;
|
|
10
|
+
}) => TrendIndicatorProps | null;
|
|
11
|
+
export declare const calculateDynamicLevelsTrends: (dynamicLevels: IBasePathAnalyticPageWithChild[], previousPathAnalyticsMap: Record<string, IBasePathAnalyticPageWithChild>) => Record<string, TrendIndicatorProps>;
|
|
12
|
+
export declare const calculateConversionMetricsTrends: (dynamicLevels: IBasePathAnalyticPageWithChild[], previousPathAnalyticsMap: Record<string, IBasePathAnalyticPageWithChild>, pageWithMetric?: IBasePathAnalyticPageWithChild) => Record<string, TrendIndicatorProps>;
|
|
13
|
+
export declare const calculateConversionFunnelTrends: ({ pageWithMetric, previousPathAnalyticsMap, dynamicLevels, }: {
|
|
14
|
+
pageWithMetric?: IBasePathAnalyticPageWithChild;
|
|
15
|
+
previousPathAnalyticsMap: Record<string, IBasePathAnalyticPageWithChild>;
|
|
16
|
+
dynamicLevels: IBasePathAnalyticPageWithChild[];
|
|
17
|
+
}) => Record<string, TrendIndicatorProps>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { IFunnelSelectionItem } from '@/shared/charts/components/GFunnelChart/components/FunnelSelection/type';
|
|
2
|
+
import type { IOnChangeFunnelParams } from '@/shared/charts/components/GFunnelChart/components/types';
|
|
3
|
+
export declare const usePathAnalysisChart: () => {
|
|
4
|
+
lengthDisplayedLevels: number;
|
|
5
|
+
listFunnelSelection: IFunnelSelectionItem[];
|
|
6
|
+
isDisabledAddICon: boolean;
|
|
7
|
+
funnelData: import("@shopify/polaris-viz-core").DataSeries[];
|
|
8
|
+
onDeleteFunnel: (id?: string) => void;
|
|
9
|
+
onAddNextFunnel: (id: string) => void;
|
|
10
|
+
onChangeFunnel: (data: IOnChangeFunnelParams) => void;
|
|
11
|
+
getListFunnelByID: (data: {
|
|
12
|
+
level?: number;
|
|
13
|
+
parentID?: string;
|
|
14
|
+
}) => IFunnelSelectionItem[];
|
|
15
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { IOnChangeFunnelParams } from '@/shared/charts/components/GFunnelChart/components/types';
|
|
2
|
+
import type { IBasePathAnalyticPageWithChild, IBasePathAnalyticPageWithParent } from '../types';
|
|
3
|
+
import type { IPathAnalysisFirstLevel } from '../contexts';
|
|
4
|
+
interface IUsePathAnalysisFunnelProps {
|
|
5
|
+
pathAnalytics: IBasePathAnalyticPageWithParent[];
|
|
6
|
+
pathAnalysisCacheKey: string;
|
|
7
|
+
dataFirstLevels?: IPathAnalysisFirstLevel[];
|
|
8
|
+
}
|
|
9
|
+
export declare const usePathAnalysisFunnel: ({ pathAnalytics, pathAnalysisCacheKey, dataFirstLevels, }: IUsePathAnalysisFunnelProps) => {
|
|
10
|
+
pageWithMetric: IBasePathAnalyticPageWithChild | undefined;
|
|
11
|
+
dynamicLevels: IBasePathAnalyticPageWithChild[];
|
|
12
|
+
nextLevelPages: IBasePathAnalyticPageWithChild[];
|
|
13
|
+
handleAddNextLevel: (childId: string) => void;
|
|
14
|
+
handleChangeLevel: (data: IOnChangeFunnelParams) => void;
|
|
15
|
+
getPagesByParentID: (data: {
|
|
16
|
+
level?: number;
|
|
17
|
+
parentID?: string;
|
|
18
|
+
}) => IBasePathAnalyticPageWithChild[];
|
|
19
|
+
handleDeleteLevel: (id?: string) => void;
|
|
20
|
+
};
|
|
21
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { PathAnalyticPageSelectFragment } from '@/api/graphql/fragments/pathAnalytic.generated';
|
|
2
|
+
import type { IPathAnalysisFirstLevel } from '../contexts';
|
|
3
|
+
interface IUsePathAnalysisFunnelProps {
|
|
4
|
+
pathAnalytics: PathAnalyticPageSelectFragment[];
|
|
5
|
+
dataFirstLevels?: IPathAnalysisFirstLevel[];
|
|
6
|
+
}
|
|
7
|
+
export declare const usePathAnalyticsMerger: ({ pathAnalytics, dataFirstLevels }: IUsePathAnalysisFunnelProps) => {
|
|
8
|
+
processedPathAnalytics: PathAnalyticPageSelectFragment[];
|
|
9
|
+
};
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { IBasePathAnalyticPageWithChild } from '../types';
|
|
2
|
+
export interface ICachedFunnelChartDataValue {
|
|
3
|
+
firstLocationPath?: string;
|
|
4
|
+
dynamicLevels?: IBasePathAnalyticPageWithChild[];
|
|
5
|
+
}
|
|
6
|
+
interface IFunnelChartStoreState {
|
|
7
|
+
cachedFunnelChartData: Record<string, ICachedFunnelChartDataValue>;
|
|
8
|
+
setCachedFunnelChartData: (key: string, funnelChartData: ICachedFunnelChartDataValue) => void;
|
|
9
|
+
resetData: () => void;
|
|
10
|
+
}
|
|
11
|
+
export declare const useFunnelChartStore: import("zustand").UseBoundStore<import("zustand").StoreApi<IFunnelChartStoreState>>;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare enum IVariantType {
|
|
2
|
+
VARIANT_A = "A",
|
|
3
|
+
VARIANT_B = "B"
|
|
4
|
+
}
|
|
5
|
+
interface IPathAnalysisCampaignStoreState {
|
|
6
|
+
selectedVariantType: IVariantType;
|
|
7
|
+
setSelectedVariantType: (selectedVariantType: IVariantType) => void;
|
|
8
|
+
}
|
|
9
|
+
export declare const usePathAnalysisCampaignStore: import("zustand").UseBoundStore<import("zustand").StoreApi<IPathAnalysisCampaignStoreState>>;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
interface IPathAnalyticStoreState {
|
|
2
|
+
firstLevelLocationPath?: string;
|
|
3
|
+
setFirstLevelLocationPath: (firstLevelLocationPath?: string) => void;
|
|
4
|
+
}
|
|
5
|
+
export declare const usePathAnalysisStore: import("zustand").UseBoundStore<import("zustand").StoreApi<IPathAnalyticStoreState>>;
|
|
6
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './path-analysis';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { PathAnalyticMetricSelectFragment, PathAnalyticPageSelectFragment } from '@/api/graphql/fragments/pathAnalytic.generated';
|
|
2
|
+
export interface IBasePathAnalyticPageWithChild extends PathAnalyticPageSelectFragment {
|
|
3
|
+
children?: IBasePathAnalyticPageWithChild[];
|
|
4
|
+
metrics?: PathAnalyticMetricSelectFragment[];
|
|
5
|
+
}
|
|
6
|
+
export type IBasePathAnalyticPageWithParent = PathAnalyticPageSelectFragment;
|
package/dist/esm/gemxql.js
CHANGED
|
@@ -599,6 +599,27 @@ const getFormattedByInterval = (value, interval, options) => {
|
|
|
599
599
|
return dayjsTz(value).format(optionFormat.formatMonth);
|
|
600
600
|
};
|
|
601
601
|
|
|
602
|
+
var TemplateType;
|
|
603
|
+
(function (TemplateType) {
|
|
604
|
+
TemplateType["ALL"] = "all";
|
|
605
|
+
TemplateType["HOME"] = "index";
|
|
606
|
+
TemplateType["COLLECTION"] = "collection";
|
|
607
|
+
TemplateType["COLLECTION_LIST"] = "collection-list";
|
|
608
|
+
TemplateType["PRODUCT"] = "product";
|
|
609
|
+
TemplateType["ARTICLE"] = "article";
|
|
610
|
+
TemplateType["PAGE"] = "page";
|
|
611
|
+
TemplateType["CART"] = "cart";
|
|
612
|
+
TemplateType["SEARCH"] = "search";
|
|
613
|
+
TemplateType["NOT_FOUND"] = "404";
|
|
614
|
+
TemplateType["BLOG"] = "blog";
|
|
615
|
+
TemplateType["PASSWORD"] = "password";
|
|
616
|
+
TemplateType["CONTACT"] = "contact";
|
|
617
|
+
TemplateType["GIF_CART"] = "gif-cart";
|
|
618
|
+
TemplateType["ACCOUNT"] = "account";
|
|
619
|
+
TemplateType["CHECKOUT"] = "checkout";
|
|
620
|
+
TemplateType["GIFT_CARD"] = "gift-card";
|
|
621
|
+
})(TemplateType || (TemplateType = {}));
|
|
622
|
+
|
|
602
623
|
const toDate = (value) => (typeof value === 'string' ? dayjsTz(value) : value);
|
|
603
624
|
const isMidnight = (date) => date.hour() === 0 && date.minute() === 0;
|
|
604
625
|
const formatDateForQuery = (date, isEndDay = false) => {
|
|
@@ -970,6 +991,7 @@ var EMetricKey;
|
|
|
970
991
|
EMetricKey["VISITOR_ITEMS"] = "visitor_items";
|
|
971
992
|
EMetricKey["DEVICE_ITEMS"] = "device_items";
|
|
972
993
|
EMetricKey["TRAFFIC_SOURCE_ITEMS"] = "traffic_source_items";
|
|
994
|
+
EMetricKey["PAGE_PATH_ANALYSIS"] = "PAGE_PATH_ANALYSIS";
|
|
973
995
|
})(EMetricKey || (EMetricKey = {}));
|
|
974
996
|
|
|
975
997
|
({
|
|
@@ -1061,6 +1083,10 @@ var EMetricKey;
|
|
|
1061
1083
|
title: 'Sessions by traffic source',
|
|
1062
1084
|
content: 'Sessions on your page by where visitors come from',
|
|
1063
1085
|
},
|
|
1086
|
+
[EMetricKey.PAGE_PATH_ANALYSIS]: {
|
|
1087
|
+
title: 'Journey analysis',
|
|
1088
|
+
content: 'Journey analysis tracks the journey from entry to purchase and shows where visitors leave the store',
|
|
1089
|
+
},
|
|
1064
1090
|
});
|
|
1065
1091
|
|
|
1066
1092
|
var EAnalyticMode;
|
|
@@ -1093,6 +1119,43 @@ var ETrafficSourceType;
|
|
|
1093
1119
|
ETrafficSourceType["SMS"] = "sms";
|
|
1094
1120
|
})(ETrafficSourceType || (ETrafficSourceType = {}));
|
|
1095
1121
|
|
|
1122
|
+
/**
|
|
1123
|
+
* Pricing enums mirrored from the host app (`~/modules/pricing/types`).
|
|
1124
|
+
*
|
|
1125
|
+
* They are duplicated here so the SDK no longer needs to import the host's
|
|
1126
|
+
* pricing module directly. The host can import these enums back from
|
|
1127
|
+
* `@gem-sdk/analytics/types` to build the value passed to `PricingProvider`,
|
|
1128
|
+
* which guarantees the string values stay in sync on both sides.
|
|
1129
|
+
*/
|
|
1130
|
+
var IPlanKey;
|
|
1131
|
+
(function (IPlanKey) {
|
|
1132
|
+
/**
|
|
1133
|
+
* @deprecated This plan is available for users installed before release 1.3.0.
|
|
1134
|
+
*/
|
|
1135
|
+
IPlanKey["CONTENT_TESTING"] = "content-testing";
|
|
1136
|
+
IPlanKey["PAGE_OPT"] = "page-optimize";
|
|
1137
|
+
IPlanKey["FUNNEL_OPT"] = "funnel-optimize";
|
|
1138
|
+
IPlanKey["PROFIT_OPT"] = "profit-optimize";
|
|
1139
|
+
// Trial plans
|
|
1140
|
+
IPlanKey["TRIAL_PAGE_OPT"] = "trial-page-optimize";
|
|
1141
|
+
IPlanKey["TRIAL_FUNNEL_OPT"] = "trial-funnel-optimize";
|
|
1142
|
+
IPlanKey["TRIAL_PROFIT_OPT"] = "trial-profit-optimize";
|
|
1143
|
+
})(IPlanKey || (IPlanKey = {}));
|
|
1144
|
+
var IShopPlanState;
|
|
1145
|
+
(function (IShopPlanState) {
|
|
1146
|
+
IShopPlanState["TRIAL_PAGE_OPT"] = "TRIAL_PAGE_OPT";
|
|
1147
|
+
IShopPlanState["TRIAL_FUNNEL_OPT"] = "TRIAL_FUNNEL_OPT";
|
|
1148
|
+
IShopPlanState["TRIAL_PROFIT_OPT"] = "TRIAL_PROFIT_OPT";
|
|
1149
|
+
IShopPlanState["ACTIVE_PAGE_OPT"] = "ACTIVE_PAGE_OPT";
|
|
1150
|
+
IShopPlanState["ACTIVE_FUNNEL_OPT"] = "ACTIVE_FUNNEL_OPT";
|
|
1151
|
+
IShopPlanState["ACTIVE_PROFIT_OPT"] = "ACTIVE_PROFIT_OPT";
|
|
1152
|
+
IShopPlanState["LOADING_PLAN"] = "LOADING_PLAN";
|
|
1153
|
+
IShopPlanState["TRIAL_EXPIRED"] = "TRIAL_EXPIRED";
|
|
1154
|
+
IShopPlanState["ACTIVE_PAGE_OPT_AND_TRIAL_PAGE_OPT"] = "ACTIVE_PAGE_OPT_AND_TRIAL_PAGE_OPT";
|
|
1155
|
+
IShopPlanState["ACTIVE_PAGE_OPT_AND_TRIAL_FUNNEL_OPT"] = "ACTIVE_PAGE_OPT_AND_TRIAL_FUNNEL_OPT";
|
|
1156
|
+
IShopPlanState["ACTIVE_FUNNEL_OPT_AND_TRIAL_FUNNEL_OPT"] = "ACTIVE_FUNNEL_OPT_AND_TRIAL_FUNNEL_OPT";
|
|
1157
|
+
})(IShopPlanState || (IShopPlanState = {}));
|
|
1158
|
+
|
|
1096
1159
|
[
|
|
1097
1160
|
{ value: EVisitorType.NEW, label: 'New' },
|
|
1098
1161
|
{ value: EVisitorType.RETURNING, label: 'Returning' },
|
package/dist/esm/gemxql.mjs
CHANGED
|
@@ -599,6 +599,27 @@ const getFormattedByInterval = (value, interval, options) => {
|
|
|
599
599
|
return dayjsTz(value).format(optionFormat.formatMonth);
|
|
600
600
|
};
|
|
601
601
|
|
|
602
|
+
var TemplateType;
|
|
603
|
+
(function (TemplateType) {
|
|
604
|
+
TemplateType["ALL"] = "all";
|
|
605
|
+
TemplateType["HOME"] = "index";
|
|
606
|
+
TemplateType["COLLECTION"] = "collection";
|
|
607
|
+
TemplateType["COLLECTION_LIST"] = "collection-list";
|
|
608
|
+
TemplateType["PRODUCT"] = "product";
|
|
609
|
+
TemplateType["ARTICLE"] = "article";
|
|
610
|
+
TemplateType["PAGE"] = "page";
|
|
611
|
+
TemplateType["CART"] = "cart";
|
|
612
|
+
TemplateType["SEARCH"] = "search";
|
|
613
|
+
TemplateType["NOT_FOUND"] = "404";
|
|
614
|
+
TemplateType["BLOG"] = "blog";
|
|
615
|
+
TemplateType["PASSWORD"] = "password";
|
|
616
|
+
TemplateType["CONTACT"] = "contact";
|
|
617
|
+
TemplateType["GIF_CART"] = "gif-cart";
|
|
618
|
+
TemplateType["ACCOUNT"] = "account";
|
|
619
|
+
TemplateType["CHECKOUT"] = "checkout";
|
|
620
|
+
TemplateType["GIFT_CARD"] = "gift-card";
|
|
621
|
+
})(TemplateType || (TemplateType = {}));
|
|
622
|
+
|
|
602
623
|
const toDate = (value) => (typeof value === 'string' ? dayjsTz(value) : value);
|
|
603
624
|
const isMidnight = (date) => date.hour() === 0 && date.minute() === 0;
|
|
604
625
|
const formatDateForQuery = (date, isEndDay = false) => {
|
|
@@ -970,6 +991,7 @@ var EMetricKey;
|
|
|
970
991
|
EMetricKey["VISITOR_ITEMS"] = "visitor_items";
|
|
971
992
|
EMetricKey["DEVICE_ITEMS"] = "device_items";
|
|
972
993
|
EMetricKey["TRAFFIC_SOURCE_ITEMS"] = "traffic_source_items";
|
|
994
|
+
EMetricKey["PAGE_PATH_ANALYSIS"] = "PAGE_PATH_ANALYSIS";
|
|
973
995
|
})(EMetricKey || (EMetricKey = {}));
|
|
974
996
|
|
|
975
997
|
({
|
|
@@ -1061,6 +1083,10 @@ var EMetricKey;
|
|
|
1061
1083
|
title: 'Sessions by traffic source',
|
|
1062
1084
|
content: 'Sessions on your page by where visitors come from',
|
|
1063
1085
|
},
|
|
1086
|
+
[EMetricKey.PAGE_PATH_ANALYSIS]: {
|
|
1087
|
+
title: 'Journey analysis',
|
|
1088
|
+
content: 'Journey analysis tracks the journey from entry to purchase and shows where visitors leave the store',
|
|
1089
|
+
},
|
|
1064
1090
|
});
|
|
1065
1091
|
|
|
1066
1092
|
var EAnalyticMode;
|
|
@@ -1093,6 +1119,43 @@ var ETrafficSourceType;
|
|
|
1093
1119
|
ETrafficSourceType["SMS"] = "sms";
|
|
1094
1120
|
})(ETrafficSourceType || (ETrafficSourceType = {}));
|
|
1095
1121
|
|
|
1122
|
+
/**
|
|
1123
|
+
* Pricing enums mirrored from the host app (`~/modules/pricing/types`).
|
|
1124
|
+
*
|
|
1125
|
+
* They are duplicated here so the SDK no longer needs to import the host's
|
|
1126
|
+
* pricing module directly. The host can import these enums back from
|
|
1127
|
+
* `@gem-sdk/analytics/types` to build the value passed to `PricingProvider`,
|
|
1128
|
+
* which guarantees the string values stay in sync on both sides.
|
|
1129
|
+
*/
|
|
1130
|
+
var IPlanKey;
|
|
1131
|
+
(function (IPlanKey) {
|
|
1132
|
+
/**
|
|
1133
|
+
* @deprecated This plan is available for users installed before release 1.3.0.
|
|
1134
|
+
*/
|
|
1135
|
+
IPlanKey["CONTENT_TESTING"] = "content-testing";
|
|
1136
|
+
IPlanKey["PAGE_OPT"] = "page-optimize";
|
|
1137
|
+
IPlanKey["FUNNEL_OPT"] = "funnel-optimize";
|
|
1138
|
+
IPlanKey["PROFIT_OPT"] = "profit-optimize";
|
|
1139
|
+
// Trial plans
|
|
1140
|
+
IPlanKey["TRIAL_PAGE_OPT"] = "trial-page-optimize";
|
|
1141
|
+
IPlanKey["TRIAL_FUNNEL_OPT"] = "trial-funnel-optimize";
|
|
1142
|
+
IPlanKey["TRIAL_PROFIT_OPT"] = "trial-profit-optimize";
|
|
1143
|
+
})(IPlanKey || (IPlanKey = {}));
|
|
1144
|
+
var IShopPlanState;
|
|
1145
|
+
(function (IShopPlanState) {
|
|
1146
|
+
IShopPlanState["TRIAL_PAGE_OPT"] = "TRIAL_PAGE_OPT";
|
|
1147
|
+
IShopPlanState["TRIAL_FUNNEL_OPT"] = "TRIAL_FUNNEL_OPT";
|
|
1148
|
+
IShopPlanState["TRIAL_PROFIT_OPT"] = "TRIAL_PROFIT_OPT";
|
|
1149
|
+
IShopPlanState["ACTIVE_PAGE_OPT"] = "ACTIVE_PAGE_OPT";
|
|
1150
|
+
IShopPlanState["ACTIVE_FUNNEL_OPT"] = "ACTIVE_FUNNEL_OPT";
|
|
1151
|
+
IShopPlanState["ACTIVE_PROFIT_OPT"] = "ACTIVE_PROFIT_OPT";
|
|
1152
|
+
IShopPlanState["LOADING_PLAN"] = "LOADING_PLAN";
|
|
1153
|
+
IShopPlanState["TRIAL_EXPIRED"] = "TRIAL_EXPIRED";
|
|
1154
|
+
IShopPlanState["ACTIVE_PAGE_OPT_AND_TRIAL_PAGE_OPT"] = "ACTIVE_PAGE_OPT_AND_TRIAL_PAGE_OPT";
|
|
1155
|
+
IShopPlanState["ACTIVE_PAGE_OPT_AND_TRIAL_FUNNEL_OPT"] = "ACTIVE_PAGE_OPT_AND_TRIAL_FUNNEL_OPT";
|
|
1156
|
+
IShopPlanState["ACTIVE_FUNNEL_OPT_AND_TRIAL_FUNNEL_OPT"] = "ACTIVE_FUNNEL_OPT_AND_TRIAL_FUNNEL_OPT";
|
|
1157
|
+
})(IShopPlanState || (IShopPlanState = {}));
|
|
1158
|
+
|
|
1096
1159
|
[
|
|
1097
1160
|
{ value: EVisitorType.NEW, label: 'New' },
|
|
1098
1161
|
{ value: EVisitorType.RETURNING, label: 'Returning' },
|