@burdenoff/microfe-headshotmarketing 2026.1030.13 → 2026.1101.1
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/generated/wspace-operations.d.ts +251 -0
- package/dist/generated/wspace-operations.d.ts.map +1 -1
- package/dist/generated/wspace-operations.js +446 -322
- package/dist/generated/wspace-operations.js.map +1 -1
- package/dist/generated/wspace-types.d.ts +4370 -34
- package/dist/generated/wspace-types.d.ts.map +1 -1
- package/dist/generated/wspace-types.js +3 -1
- package/dist/generated/wspace-types.js.map +1 -1
- package/dist/headshotmarketing/components/TrackedLinksPanel.d.ts +19 -0
- package/dist/headshotmarketing/components/TrackedLinksPanel.d.ts.map +1 -0
- package/dist/headshotmarketing/components/TrackedLinksPanel.js +246 -0
- package/dist/headshotmarketing/components/TrackedLinksPanel.js.map +1 -0
- package/dist/headshotmarketing/components/index.d.ts +1 -0
- package/dist/headshotmarketing/components/index.d.ts.map +1 -1
- package/dist/headshotmarketing/components/index.js +1 -0
- package/dist/headshotmarketing/pages/ads/AdCampaignDetailsPage.d.ts.map +1 -1
- package/dist/headshotmarketing/pages/ads/AdCampaignDetailsPage.js +245 -211
- package/dist/headshotmarketing/pages/ads/AdCampaignDetailsPage.js.map +1 -1
- package/dist/headshotmarketing/pages/ads/AdCreativesPage.d.ts.map +1 -1
- package/dist/headshotmarketing/pages/ads/AdCreativesPage.js +86 -76
- package/dist/headshotmarketing/pages/ads/AdCreativesPage.js.map +1 -1
- package/dist/headshotmarketing/pages/analytics/AttributionPage.d.ts.map +1 -1
- package/dist/headshotmarketing/pages/analytics/AttributionPage.js +249 -244
- package/dist/headshotmarketing/pages/analytics/AttributionPage.js.map +1 -1
- package/dist/headshotmarketing/pages/analytics/TouchpointLedgerCard.d.ts +4 -0
- package/dist/headshotmarketing/pages/analytics/TouchpointLedgerCard.d.ts.map +1 -0
- package/dist/headshotmarketing/pages/analytics/TouchpointLedgerCard.js +196 -0
- package/dist/headshotmarketing/pages/analytics/TouchpointLedgerCard.js.map +1 -0
- package/dist/headshotmarketing/pages/content/AIGeneratedBadge.d.ts +12 -0
- package/dist/headshotmarketing/pages/content/AIGeneratedBadge.d.ts.map +1 -0
- package/dist/headshotmarketing/pages/content/AIGeneratedBadge.js +30 -0
- package/dist/headshotmarketing/pages/content/AIGeneratedBadge.js.map +1 -0
- package/dist/headshotmarketing/pages/content/AIToolsPage.d.ts.map +1 -1
- package/dist/headshotmarketing/pages/content/AIToolsPage.js +51 -50
- package/dist/headshotmarketing/pages/content/AIToolsPage.js.map +1 -1
- package/dist/headshotmarketing/pages/content/ContentCreationPage.d.ts.map +1 -1
- package/dist/headshotmarketing/pages/content/ContentCreationPage.js +409 -408
- package/dist/headshotmarketing/pages/content/ContentCreationPage.js.map +1 -1
- package/dist/headshotmarketing/pages/content/ContentDetailsPage.d.ts.map +1 -1
- package/dist/headshotmarketing/pages/content/ContentDetailsPage.js +158 -104
- package/dist/headshotmarketing/pages/content/ContentDetailsPage.js.map +1 -1
- package/dist/headshotmarketing/pages/content/ContentItemActions.d.ts +5 -0
- package/dist/headshotmarketing/pages/content/ContentItemActions.d.ts.map +1 -1
- package/dist/headshotmarketing/pages/content/ContentItemActions.js +103 -34
- package/dist/headshotmarketing/pages/content/ContentItemActions.js.map +1 -1
- package/dist/headshotmarketing/pages/content/ContentLibraryCard.d.ts.map +1 -1
- package/dist/headshotmarketing/pages/content/ContentLibraryCard.js +102 -102
- package/dist/headshotmarketing/pages/content/ContentLibraryCard.js.map +1 -1
- package/dist/headshotmarketing/pages/crm/LeadCreateModal.d.ts.map +1 -1
- package/dist/headshotmarketing/pages/crm/LeadCreateModal.js +150 -76
- package/dist/headshotmarketing/pages/crm/LeadCreateModal.js.map +1 -1
- package/dist/headshotmarketing/pages/social-media/PostsPage.d.ts.map +1 -1
- package/dist/headshotmarketing/pages/social-media/PostsPage.js +254 -246
- package/dist/headshotmarketing/pages/social-media/PostsPage.js.map +1 -1
- package/dist/headshotmarketing/types/index.d.ts +17 -0
- package/dist/headshotmarketing/types/index.d.ts.map +1 -1
- package/dist/headshotmarketing/utils/contentLibrary.d.ts +6 -0
- package/dist/headshotmarketing/utils/contentLibrary.d.ts.map +1 -1
- package/dist/headshotmarketing/utils/contentLibrary.js +17 -11
- package/dist/headshotmarketing/utils/contentLibrary.js.map +1 -1
- package/dist/headshotmarketing/utils/contentMapper.d.ts +13 -1
- package/dist/headshotmarketing/utils/contentMapper.d.ts.map +1 -1
- package/dist/headshotmarketing/utils/contentMapper.js +26 -13
- package/dist/headshotmarketing/utils/contentMapper.js.map +1 -1
- package/dist/headshotmarketing/utils/trackedLinks.d.ts +75 -0
- package/dist/headshotmarketing/utils/trackedLinks.d.ts.map +1 -0
- package/dist/headshotmarketing/utils/trackedLinks.js +99 -0
- package/dist/headshotmarketing/utils/trackedLinks.js.map +1 -0
- package/package.json +1 -1
|
@@ -6,59 +6,60 @@ import { Bar as a } from "../../../node_modules/recharts/es6/cartesian/Bar.js";
|
|
|
6
6
|
import { CartesianGrid as o } from "../../../node_modules/recharts/es6/cartesian/CartesianGrid.js";
|
|
7
7
|
import { XAxis as s } from "../../../node_modules/recharts/es6/cartesian/XAxis.js";
|
|
8
8
|
import { YAxis as c } from "../../../node_modules/recharts/es6/cartesian/YAxis.js";
|
|
9
|
-
import { BarChart as
|
|
10
|
-
import { formatCurrency as
|
|
11
|
-
import { HeadshotmarketingAttributionModel as
|
|
12
|
-
import { PageLayout as
|
|
13
|
-
import { StatCard as
|
|
14
|
-
import { DataTable as
|
|
15
|
-
import { EmptyState as
|
|
16
|
-
import { ChartCard as
|
|
17
|
-
import { QueryStateBoundary as
|
|
9
|
+
import { BarChart as l } from "../../../node_modules/recharts/es6/chart/BarChart.js";
|
|
10
|
+
import { formatCurrency as u, formatNumber as d } from "../../utils/helpers.js";
|
|
11
|
+
import { HeadshotmarketingAttributionModel as f, HeadshotmarketingDataDrivenStatus as ee } from "../../../generated/wspace-types.js";
|
|
12
|
+
import { PageLayout as te } from "../../components/PageLayout.js";
|
|
13
|
+
import { StatCard as p } from "../../components/StatCard.js";
|
|
14
|
+
import { DataTable as m } from "../../components/DataTable.js";
|
|
15
|
+
import { EmptyState as ne } from "../../components/EmptyState.js";
|
|
16
|
+
import { ChartCard as h } from "../../components/ChartCard.js";
|
|
17
|
+
import { QueryStateBoundary as g } from "../../components/QueryStateBoundary.js";
|
|
18
18
|
import "../../components/index.js";
|
|
19
|
+
import { TouchpointLedgerCard as _ } from "./TouchpointLedgerCard.js";
|
|
19
20
|
import { useMemo as v, useState as y } from "react";
|
|
20
|
-
import { DollarSign as b, Gem as
|
|
21
|
-
import { Fragment as
|
|
22
|
-
import { EmphasisPanel as
|
|
21
|
+
import { DollarSign as b, Gem as re, GitBranch as x, Target as ie, Unlink as ae, Users as S } from "lucide-react";
|
|
22
|
+
import { Fragment as C, jsx as w, jsxs as T } from "react/jsx-runtime";
|
|
23
|
+
import { EmphasisPanel as E, PagePurpose as D } from "@burdenoff/fe-libs/ui";
|
|
23
24
|
//#region src/headshotmarketing/pages/analytics/AttributionPage.tsx
|
|
24
|
-
var
|
|
25
|
+
var O = [
|
|
25
26
|
{
|
|
26
|
-
value:
|
|
27
|
+
value: f.PositionBased,
|
|
27
28
|
label: "Position-based (U-shaped)",
|
|
28
29
|
description: "40% to the first touch, 40% to the last, 20% shared across the middle."
|
|
29
30
|
},
|
|
30
31
|
{
|
|
31
|
-
value:
|
|
32
|
+
value: f.Linear,
|
|
32
33
|
label: "Linear",
|
|
33
34
|
description: "Credit split evenly across every touch in the journey."
|
|
34
35
|
},
|
|
35
36
|
{
|
|
36
|
-
value:
|
|
37
|
+
value: f.TimeDecay,
|
|
37
38
|
label: "Time decay",
|
|
38
39
|
description: "Touches closer to the close earn more credit (7-day half-life)."
|
|
39
40
|
},
|
|
40
41
|
{
|
|
41
|
-
value:
|
|
42
|
+
value: f.FirstTouch,
|
|
42
43
|
label: "First touch",
|
|
43
44
|
description: "All credit to the touch that opened the journey."
|
|
44
45
|
},
|
|
45
46
|
{
|
|
46
|
-
value:
|
|
47
|
+
value: f.LastTouch,
|
|
47
48
|
label: "Last touch",
|
|
48
49
|
description: "All credit to the final touch before the deal closed."
|
|
49
50
|
},
|
|
50
51
|
{
|
|
51
|
-
value:
|
|
52
|
+
value: f.DataDriven,
|
|
52
53
|
label: "Data-driven (learned)",
|
|
53
54
|
description: "Channel weights learned from this workspace's converting and non-converting journeys (Markov removal effect)."
|
|
54
55
|
}
|
|
55
|
-
],
|
|
56
|
+
], oe = [
|
|
56
57
|
30,
|
|
57
58
|
90,
|
|
58
59
|
180,
|
|
59
60
|
365
|
|
60
|
-
],
|
|
61
|
-
function
|
|
61
|
+
], se = 864e5, k = "__none__";
|
|
62
|
+
function A(e, t, n, r, i, a) {
|
|
62
63
|
let o = (e) => ({
|
|
63
64
|
lifetimeValue: e?.attributedLifetimeValue ?? 0,
|
|
64
65
|
averageLifetimeValue: e?.averageLifetimeValue ?? 0
|
|
@@ -69,22 +70,22 @@ function j(e, t, n, r, i, a) {
|
|
|
69
70
|
for (let e of s.values()) c.push(a(e, o(e)));
|
|
70
71
|
return c;
|
|
71
72
|
}
|
|
72
|
-
var
|
|
73
|
+
var j = () => [{
|
|
73
74
|
key: "lifetimeValue",
|
|
74
75
|
header: "Customer LTV",
|
|
75
76
|
sortable: !0,
|
|
76
|
-
render: (e) =>
|
|
77
|
+
render: (e) => u(e.lifetimeValue)
|
|
77
78
|
}, {
|
|
78
79
|
key: "averageLifetimeValue",
|
|
79
80
|
header: "Avg. LTV",
|
|
80
81
|
sortable: !0,
|
|
81
|
-
render: (e) =>
|
|
82
|
-
}],
|
|
82
|
+
render: (e) => u(e.averageLifetimeValue)
|
|
83
|
+
}], M = (e) => `${(e * 100).toFixed(1)}%`, ce = [
|
|
83
84
|
{
|
|
84
85
|
key: "channel",
|
|
85
86
|
header: "Channel",
|
|
86
87
|
sortable: !0,
|
|
87
|
-
render: (e) => /* @__PURE__ */
|
|
88
|
+
render: (e) => /* @__PURE__ */ w("span", {
|
|
88
89
|
className: "font-medium text-text-primary capitalize",
|
|
89
90
|
children: e.channel.replace(/_/g, " ")
|
|
90
91
|
})
|
|
@@ -93,37 +94,37 @@ var M = () => [{
|
|
|
93
94
|
key: "weight",
|
|
94
95
|
header: "Learned weight",
|
|
95
96
|
sortable: !0,
|
|
96
|
-
render: (e) =>
|
|
97
|
+
render: (e) => M(e.weight)
|
|
97
98
|
},
|
|
98
99
|
{
|
|
99
100
|
key: "removalEffect",
|
|
100
101
|
header: "Removal effect",
|
|
101
102
|
sortable: !0,
|
|
102
|
-
render: (e) =>
|
|
103
|
+
render: (e) => M(e.removalEffect)
|
|
103
104
|
}
|
|
104
|
-
],
|
|
105
|
+
], N = () => ({
|
|
105
106
|
key: "revenueShare",
|
|
106
107
|
header: "Share",
|
|
107
108
|
sortable: !0,
|
|
108
|
-
render: (e) => /* @__PURE__ */
|
|
109
|
+
render: (e) => /* @__PURE__ */ T("div", {
|
|
109
110
|
className: "flex items-center gap-2",
|
|
110
|
-
children: [/* @__PURE__ */
|
|
111
|
+
children: [/* @__PURE__ */ w("div", {
|
|
111
112
|
className: "w-16 h-2 rounded-full bg-bg-sunken overflow-hidden",
|
|
112
|
-
children: /* @__PURE__ */
|
|
113
|
+
children: /* @__PURE__ */ w("div", {
|
|
113
114
|
className: "h-full rounded-full bg-action-primary-bg",
|
|
114
115
|
style: { width: `${Math.min(e.revenueShare * 100, 100)}%` }
|
|
115
116
|
})
|
|
116
|
-
}), /* @__PURE__ */
|
|
117
|
+
}), /* @__PURE__ */ T("span", {
|
|
117
118
|
className: "text-xs text-text-secondary",
|
|
118
119
|
children: [(e.revenueShare * 100).toFixed(1), "%"]
|
|
119
120
|
})]
|
|
120
121
|
})
|
|
121
|
-
}),
|
|
122
|
+
}), P = [
|
|
122
123
|
{
|
|
123
124
|
key: "channel",
|
|
124
125
|
header: "Channel",
|
|
125
126
|
sortable: !0,
|
|
126
|
-
render: (e) => /* @__PURE__ */
|
|
127
|
+
render: (e) => /* @__PURE__ */ w("span", {
|
|
127
128
|
className: "font-medium text-text-primary capitalize",
|
|
128
129
|
children: e.channel.replace(/_/g, " ")
|
|
129
130
|
})
|
|
@@ -132,7 +133,7 @@ var M = () => [{
|
|
|
132
133
|
key: "attributedRevenue",
|
|
133
134
|
header: "Attributed revenue",
|
|
134
135
|
sortable: !0,
|
|
135
|
-
render: (e) =>
|
|
136
|
+
render: (e) => u(e.attributedRevenue)
|
|
136
137
|
},
|
|
137
138
|
{
|
|
138
139
|
key: "attributedConversions",
|
|
@@ -144,36 +145,36 @@ var M = () => [{
|
|
|
144
145
|
key: "touchpointCount",
|
|
145
146
|
header: "Touchpoints",
|
|
146
147
|
sortable: !0,
|
|
147
|
-
render: (e) =>
|
|
148
|
+
render: (e) => d(e.touchpointCount)
|
|
148
149
|
},
|
|
149
|
-
|
|
150
|
-
...
|
|
150
|
+
N(),
|
|
151
|
+
...j()
|
|
151
152
|
], F = () => {
|
|
152
|
-
let { navigate: F, basePath: I } = n(), [L, R] = y(
|
|
153
|
+
let { navigate: F, basePath: I } = n(), [L, R] = y(f.PositionBased), [z, B] = y(90), { startDate: V, endDate: H } = v(() => {
|
|
153
154
|
let e = /* @__PURE__ */ new Date();
|
|
154
155
|
return e.setHours(23, 59, 59, 999), {
|
|
155
|
-
startDate: new Date(e.getTime() - z *
|
|
156
|
+
startDate: new Date(e.getTime() - z * se).toISOString(),
|
|
156
157
|
endDate: e.toISOString()
|
|
157
158
|
};
|
|
158
|
-
}, [z]), { data: U, loading: W, error:
|
|
159
|
+
}, [z]), { data: U, loading: W, error: le, refetch: ue } = e({
|
|
159
160
|
variables: {
|
|
160
161
|
model: L,
|
|
161
162
|
startDate: V,
|
|
162
163
|
endDate: H
|
|
163
164
|
},
|
|
164
165
|
fetchPolicy: "cache-and-network"
|
|
165
|
-
}), { data:
|
|
166
|
+
}), { data: de, error: fe } = t({
|
|
166
167
|
variables: {
|
|
167
168
|
model: L,
|
|
168
169
|
startDate: V,
|
|
169
170
|
endDate: H
|
|
170
171
|
},
|
|
171
172
|
fetchPolicy: "cache-and-network"
|
|
172
|
-
}),
|
|
173
|
+
}), G = U?.headshotmarketingAttributionSummary, K = de?.headshotmarketingLifetimeValueAttribution, q = O.find((e) => e.value === L), J = G?.dataDriven ?? null, Y = J?.status === ee.InsufficientData, X = (J?.channelWeights ?? []).map((e) => ({
|
|
173
174
|
channel: e.channel,
|
|
174
175
|
weight: e.weight,
|
|
175
176
|
removalEffect: e.removalEffect
|
|
176
|
-
})), Z = v(() =>
|
|
177
|
+
})), Z = v(() => A(G?.byChannel ?? [], K?.byChannel ?? [], (e) => e.channel, (e) => e.channel, (e, t) => ({
|
|
177
178
|
channel: e.channel,
|
|
178
179
|
touchpointCount: e.touchpointCount,
|
|
179
180
|
attributedConversions: e.attributedConversions,
|
|
@@ -187,7 +188,7 @@ var M = () => [{
|
|
|
187
188
|
attributedRevenue: 0,
|
|
188
189
|
revenueShare: 0,
|
|
189
190
|
...t
|
|
190
|
-
})), [
|
|
191
|
+
})), [G, K]), pe = v(() => A(G?.byCampaign ?? [], K?.byCampaign ?? [], (e) => e.campaignId ?? k, (e) => e.campaignId ?? k, (e, t) => ({
|
|
191
192
|
campaignId: e.campaignId,
|
|
192
193
|
campaignName: e.campaignName,
|
|
193
194
|
touchpointCount: e.touchpointCount,
|
|
@@ -203,18 +204,18 @@ var M = () => [{
|
|
|
203
204
|
attributedRevenue: 0,
|
|
204
205
|
revenueShare: 0,
|
|
205
206
|
...t
|
|
206
|
-
})), [
|
|
207
|
+
})), [G, K]), Q = Z.map((e) => ({
|
|
207
208
|
name: e.channel.replace(/_/g, " "),
|
|
208
209
|
revenue: e.attributedRevenue
|
|
209
|
-
})),
|
|
210
|
+
})), me = [
|
|
210
211
|
{
|
|
211
212
|
key: "campaignName",
|
|
212
213
|
header: "Campaign",
|
|
213
214
|
sortable: !0,
|
|
214
|
-
render: (e) => e.campaignId ? /* @__PURE__ */
|
|
215
|
+
render: (e) => e.campaignId ? /* @__PURE__ */ w("span", {
|
|
215
216
|
className: "font-medium text-text-primary",
|
|
216
217
|
children: e.campaignName ?? "Deleted campaign"
|
|
217
|
-
}) : /* @__PURE__ */
|
|
218
|
+
}) : /* @__PURE__ */ w("span", {
|
|
218
219
|
className: "text-text-secondary italic",
|
|
219
220
|
children: "No campaign"
|
|
220
221
|
})
|
|
@@ -223,7 +224,7 @@ var M = () => [{
|
|
|
223
224
|
key: "attributedRevenue",
|
|
224
225
|
header: "Attributed revenue",
|
|
225
226
|
sortable: !0,
|
|
226
|
-
render: (e) =>
|
|
227
|
+
render: (e) => u(e.attributedRevenue)
|
|
227
228
|
},
|
|
228
229
|
{
|
|
229
230
|
key: "attributedConversions",
|
|
@@ -235,33 +236,33 @@ var M = () => [{
|
|
|
235
236
|
key: "touchpointCount",
|
|
236
237
|
header: "Touchpoints",
|
|
237
238
|
sortable: !0,
|
|
238
|
-
render: (e) =>
|
|
239
|
+
render: (e) => d(e.touchpointCount)
|
|
239
240
|
},
|
|
240
|
-
|
|
241
|
-
...
|
|
241
|
+
N(),
|
|
242
|
+
...j()
|
|
242
243
|
], $ = "rounded-md border border-border-seam bg-gloss-card shadow-pop px-3 py-2 text-sm text-text-primary";
|
|
243
|
-
return /* @__PURE__ */
|
|
244
|
+
return /* @__PURE__ */ T(te, {
|
|
244
245
|
title: "Attribution",
|
|
245
246
|
description: "Multi-touch attribution of closed-won revenue",
|
|
246
|
-
actions: /* @__PURE__ */
|
|
247
|
+
actions: /* @__PURE__ */ T("div", {
|
|
247
248
|
className: "flex flex-wrap items-center gap-2",
|
|
248
|
-
children: [/* @__PURE__ */
|
|
249
|
+
children: [/* @__PURE__ */ w("select", {
|
|
249
250
|
"aria-label": "Attribution model",
|
|
250
251
|
"data-testid": "attribution-model",
|
|
251
252
|
value: L,
|
|
252
253
|
onChange: (e) => R(e.target.value),
|
|
253
254
|
className: $,
|
|
254
|
-
children:
|
|
255
|
+
children: O.map((e) => /* @__PURE__ */ w("option", {
|
|
255
256
|
value: e.value,
|
|
256
257
|
children: e.label
|
|
257
258
|
}, e.value))
|
|
258
|
-
}), /* @__PURE__ */
|
|
259
|
+
}), /* @__PURE__ */ w("select", {
|
|
259
260
|
"aria-label": "Date range",
|
|
260
261
|
"data-testid": "attribution-window",
|
|
261
262
|
value: z,
|
|
262
263
|
onChange: (e) => B(Number(e.target.value)),
|
|
263
264
|
className: $,
|
|
264
|
-
children:
|
|
265
|
+
children: oe.map((e) => /* @__PURE__ */ T("option", {
|
|
265
266
|
value: e,
|
|
266
267
|
children: [
|
|
267
268
|
"Last ",
|
|
@@ -271,197 +272,201 @@ var M = () => [{
|
|
|
271
272
|
}, e))
|
|
272
273
|
})]
|
|
273
274
|
}),
|
|
274
|
-
children: [
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
title: "Closed-won revenue",
|
|
286
|
-
value: l(K.totalRevenue),
|
|
287
|
-
icon: /* @__PURE__ */ T(b, { className: "h-4 w-4" }),
|
|
288
|
-
featured: !0
|
|
289
|
-
}),
|
|
290
|
-
/* @__PURE__ */ T(m, {
|
|
291
|
-
title: "Attributed revenue",
|
|
292
|
-
value: l(K.attributedRevenue),
|
|
293
|
-
icon: /* @__PURE__ */ T(x, { className: "h-4 w-4" })
|
|
294
|
-
}),
|
|
295
|
-
/* @__PURE__ */ T(m, {
|
|
296
|
-
title: "Deals with a journey",
|
|
297
|
-
value: `${u(K.attributedConversionCount)} / ${u(K.conversionCount)}`,
|
|
298
|
-
icon: /* @__PURE__ */ T(S, { className: "h-4 w-4" })
|
|
299
|
-
}),
|
|
300
|
-
/* @__PURE__ */ T(m, {
|
|
301
|
-
title: "Unattributed revenue",
|
|
302
|
-
value: l(K.unattributedRevenue),
|
|
303
|
-
icon: /* @__PURE__ */ T(C, { className: "h-4 w-4" })
|
|
304
|
-
})
|
|
305
|
-
]
|
|
306
|
-
}) }),
|
|
307
|
-
J && /* @__PURE__ */ E("p", {
|
|
308
|
-
className: "text-sm text-text-secondary",
|
|
309
|
-
"data-testid": "attribution-model-description",
|
|
310
|
-
children: [
|
|
311
|
-
/* @__PURE__ */ E("span", {
|
|
312
|
-
className: "font-medium text-text-primary",
|
|
313
|
-
children: [J.label, ":"]
|
|
314
|
-
}),
|
|
315
|
-
" ",
|
|
316
|
-
J.description
|
|
317
|
-
]
|
|
318
|
-
}),
|
|
319
|
-
q && /* @__PURE__ */ E("div", {
|
|
320
|
-
className: "grid grid-cols-1 sm:grid-cols-3 gap-4",
|
|
321
|
-
"data-testid": "attribution-clv-stats",
|
|
322
|
-
children: [
|
|
323
|
-
/* @__PURE__ */ T(m, {
|
|
324
|
-
title: "Customers acquired",
|
|
325
|
-
value: `${u(q.attributedCustomerCount)} / ${u(q.customerCount)} with a journey`,
|
|
326
|
-
icon: /* @__PURE__ */ T(re, { className: "h-4 w-4" })
|
|
327
|
-
}),
|
|
328
|
-
/* @__PURE__ */ T(m, {
|
|
329
|
-
title: "Avg. customer lifetime value",
|
|
330
|
-
value: l(q.averageLifetimeValue),
|
|
331
|
-
icon: /* @__PURE__ */ T(ne, { className: "h-4 w-4" })
|
|
332
|
-
}),
|
|
333
|
-
/* @__PURE__ */ T(m, {
|
|
334
|
-
title: "Attributed lifetime value",
|
|
335
|
-
value: l(q.attributedLifetimeValue),
|
|
336
|
-
icon: /* @__PURE__ */ T(b, { className: "h-4 w-4" })
|
|
337
|
-
})
|
|
338
|
-
]
|
|
339
|
-
}),
|
|
340
|
-
ue && !q && /* @__PURE__ */ T("p", {
|
|
341
|
-
className: "text-sm text-status-warning-text",
|
|
342
|
-
children: "Customer lifetime value could not be loaded right now; revenue attribution below is unaffected."
|
|
343
|
-
}),
|
|
344
|
-
Y && X && /* @__PURE__ */ E("div", {
|
|
345
|
-
className: "rounded-md border border-border-seam bg-gloss-card p-4 text-sm text-text-secondary",
|
|
346
|
-
"data-testid": "attribution-insufficient-data",
|
|
347
|
-
role: "status",
|
|
348
|
-
children: [/* @__PURE__ */ T("p", {
|
|
349
|
-
className: "font-medium text-text-primary",
|
|
350
|
-
children: "Not enough data to learn a data-driven model yet"
|
|
351
|
-
}), /* @__PURE__ */ E("p", {
|
|
352
|
-
className: "mt-1",
|
|
275
|
+
children: [
|
|
276
|
+
/* @__PURE__ */ w(D, { children: "See which channels and campaigns actually earned your closed revenue. Every deal won in the selected window is credited across the marketing touches that preceded it — leads, event registrations, check-ins, tracked-link clicks and tracked email opens are captured automatically, and connectors can send more. Switch models to compare how first-touch, last-touch, multi-touch and data-driven views shift the credit, and use the lifetime-value columns to see which channels bring in the customers worth the most over time." }),
|
|
277
|
+
/* @__PURE__ */ w(g, {
|
|
278
|
+
loading: W && !G,
|
|
279
|
+
error: le,
|
|
280
|
+
onRetry: () => void ue(),
|
|
281
|
+
hasData: !!G,
|
|
282
|
+
children: G && /* @__PURE__ */ T(C, { children: [
|
|
283
|
+
/* @__PURE__ */ w(E, { children: /* @__PURE__ */ T("div", {
|
|
284
|
+
className: "grid grid-cols-2 md:grid-cols-4 gap-4",
|
|
285
|
+
"data-testid": "attribution-stats",
|
|
353
286
|
children: [
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
287
|
+
/* @__PURE__ */ w(p, {
|
|
288
|
+
title: "Closed-won revenue",
|
|
289
|
+
value: u(G.totalRevenue),
|
|
290
|
+
icon: /* @__PURE__ */ w(b, { className: "h-4 w-4" }),
|
|
291
|
+
featured: !0
|
|
292
|
+
}),
|
|
293
|
+
/* @__PURE__ */ w(p, {
|
|
294
|
+
title: "Attributed revenue",
|
|
295
|
+
value: u(G.attributedRevenue),
|
|
296
|
+
icon: /* @__PURE__ */ w(x, { className: "h-4 w-4" })
|
|
297
|
+
}),
|
|
298
|
+
/* @__PURE__ */ w(p, {
|
|
299
|
+
title: "Deals with a journey",
|
|
300
|
+
value: `${d(G.attributedConversionCount)} / ${d(G.conversionCount)}`,
|
|
301
|
+
icon: /* @__PURE__ */ w(ie, { className: "h-4 w-4" })
|
|
302
|
+
}),
|
|
303
|
+
/* @__PURE__ */ w(p, {
|
|
304
|
+
title: "Unattributed revenue",
|
|
305
|
+
value: u(G.unattributedRevenue),
|
|
306
|
+
icon: /* @__PURE__ */ w(ae, { className: "h-4 w-4" })
|
|
307
|
+
})
|
|
308
|
+
]
|
|
309
|
+
}) }),
|
|
310
|
+
q && /* @__PURE__ */ T("p", {
|
|
311
|
+
className: "text-sm text-text-secondary",
|
|
312
|
+
"data-testid": "attribution-model-description",
|
|
313
|
+
children: [
|
|
314
|
+
/* @__PURE__ */ T("span", {
|
|
315
|
+
className: "font-medium text-text-primary",
|
|
316
|
+
children: [q.label, ":"]
|
|
317
|
+
}),
|
|
366
318
|
" ",
|
|
367
|
-
|
|
319
|
+
q.description
|
|
368
320
|
]
|
|
369
|
-
})
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
}) : /* @__PURE__ */ T(i, {
|
|
405
|
-
width: "100%",
|
|
406
|
-
height: 280,
|
|
407
|
-
children: /* @__PURE__ */ E(ee, {
|
|
408
|
-
data: Q,
|
|
321
|
+
}),
|
|
322
|
+
K && /* @__PURE__ */ T("div", {
|
|
323
|
+
className: "grid grid-cols-1 sm:grid-cols-3 gap-4",
|
|
324
|
+
"data-testid": "attribution-clv-stats",
|
|
325
|
+
children: [
|
|
326
|
+
/* @__PURE__ */ w(p, {
|
|
327
|
+
title: "Customers acquired",
|
|
328
|
+
value: `${d(K.attributedCustomerCount)} / ${d(K.customerCount)} with a journey`,
|
|
329
|
+
icon: /* @__PURE__ */ w(S, { className: "h-4 w-4" })
|
|
330
|
+
}),
|
|
331
|
+
/* @__PURE__ */ w(p, {
|
|
332
|
+
title: "Avg. customer lifetime value",
|
|
333
|
+
value: u(K.averageLifetimeValue),
|
|
334
|
+
icon: /* @__PURE__ */ w(re, { className: "h-4 w-4" })
|
|
335
|
+
}),
|
|
336
|
+
/* @__PURE__ */ w(p, {
|
|
337
|
+
title: "Attributed lifetime value",
|
|
338
|
+
value: u(K.attributedLifetimeValue),
|
|
339
|
+
icon: /* @__PURE__ */ w(b, { className: "h-4 w-4" })
|
|
340
|
+
})
|
|
341
|
+
]
|
|
342
|
+
}),
|
|
343
|
+
fe && !K && /* @__PURE__ */ w("p", {
|
|
344
|
+
className: "text-sm text-status-warning-text",
|
|
345
|
+
children: "Customer lifetime value could not be loaded right now; revenue attribution below is unaffected."
|
|
346
|
+
}),
|
|
347
|
+
J && Y && /* @__PURE__ */ T("div", {
|
|
348
|
+
className: "rounded-md border border-border-seam bg-gloss-card p-4 text-sm text-text-secondary",
|
|
349
|
+
"data-testid": "attribution-insufficient-data",
|
|
350
|
+
role: "status",
|
|
351
|
+
children: [/* @__PURE__ */ w("p", {
|
|
352
|
+
className: "font-medium text-text-primary",
|
|
353
|
+
children: "Not enough data to learn a data-driven model yet"
|
|
354
|
+
}), /* @__PURE__ */ T("p", {
|
|
355
|
+
className: "mt-1",
|
|
409
356
|
children: [
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
/* @__PURE__ */ T(a, {
|
|
425
|
-
dataKey: "revenue",
|
|
426
|
-
name: "Attributed revenue",
|
|
427
|
-
fill: "var(--color-chart-1)",
|
|
428
|
-
radius: [
|
|
429
|
-
4,
|
|
430
|
-
4,
|
|
431
|
-
0,
|
|
432
|
-
0
|
|
433
|
-
]
|
|
434
|
-
})
|
|
357
|
+
"The model needs at least",
|
|
358
|
+
" ",
|
|
359
|
+
d(J.minConvertingJourneys),
|
|
360
|
+
" converting and ",
|
|
361
|
+
d(J.minNonConvertingJourneys),
|
|
362
|
+
" ",
|
|
363
|
+
"non-converting journeys. This window has",
|
|
364
|
+
" ",
|
|
365
|
+
d(J.convertingJourneys),
|
|
366
|
+
" converting and",
|
|
367
|
+
" ",
|
|
368
|
+
d(J.nonConvertingJourneys),
|
|
369
|
+
" ",
|
|
370
|
+
"non-converting. Widen the date range, or pick a rule-based model to see credit now."
|
|
435
371
|
]
|
|
372
|
+
})]
|
|
373
|
+
}),
|
|
374
|
+
J && !Y && /* @__PURE__ */ w(h, {
|
|
375
|
+
title: "Learned channel weights",
|
|
376
|
+
subtitle: `Learned from ${d(J.convertingJourneys)} converting and ${d(J.nonConvertingJourneys)} non-converting journeys${J.baselineConversionProbability == null ? "" : ` · baseline conversion ${M(J.baselineConversionProbability)}`}`,
|
|
377
|
+
children: /* @__PURE__ */ w("div", {
|
|
378
|
+
"data-testid": "attribution-learned-weights",
|
|
379
|
+
children: /* @__PURE__ */ w(m, {
|
|
380
|
+
data: X,
|
|
381
|
+
columns: ce,
|
|
382
|
+
pageSize: 8,
|
|
383
|
+
emptyMessage: "No channels in this window."
|
|
384
|
+
})
|
|
436
385
|
})
|
|
437
|
-
})
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
386
|
+
}),
|
|
387
|
+
G.truncated && /* @__PURE__ */ w("p", {
|
|
388
|
+
className: "text-sm text-status-warning-text",
|
|
389
|
+
children: "This window holds more than 1,000 won deals; only the most recent 1,000 are attributed. Narrow the date range to see the rest."
|
|
390
|
+
}),
|
|
391
|
+
Y ? null : G.conversionCount === 0 ? /* @__PURE__ */ w(ne, {
|
|
392
|
+
icon: /* @__PURE__ */ w(x, { className: "h-6 w-6" }),
|
|
393
|
+
title: "No closed-won deals in this window",
|
|
394
|
+
description: "Attribution credits revenue from deals marked WON. Close a deal in the CRM, or widen the date range.",
|
|
395
|
+
action: /* @__PURE__ */ w("button", {
|
|
396
|
+
type: "button",
|
|
397
|
+
onClick: () => F(I + "/crm"),
|
|
398
|
+
className: "rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text",
|
|
399
|
+
children: "Open CRM"
|
|
448
400
|
})
|
|
449
|
-
})
|
|
450
|
-
title: "
|
|
451
|
-
subtitle:
|
|
452
|
-
children: /* @__PURE__ */
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
401
|
+
}) : /* @__PURE__ */ T(C, { children: [/* @__PURE__ */ w(h, {
|
|
402
|
+
title: "Attributed revenue by channel",
|
|
403
|
+
subtitle: `${d(G.touchpointCount)} touchpoints across ${d(G.attributedConversionCount)} won deals`,
|
|
404
|
+
children: Q.length === 0 ? /* @__PURE__ */ w("p", {
|
|
405
|
+
className: "py-8 text-center text-sm text-text-secondary",
|
|
406
|
+
children: "None of these deals have recorded touchpoints yet."
|
|
407
|
+
}) : /* @__PURE__ */ w(i, {
|
|
408
|
+
width: "100%",
|
|
409
|
+
height: 280,
|
|
410
|
+
children: /* @__PURE__ */ T(l, {
|
|
411
|
+
data: Q,
|
|
412
|
+
children: [
|
|
413
|
+
/* @__PURE__ */ w(o, {
|
|
414
|
+
strokeDasharray: "3 3",
|
|
415
|
+
className: "stroke-border"
|
|
416
|
+
}),
|
|
417
|
+
/* @__PURE__ */ w(s, {
|
|
418
|
+
dataKey: "name",
|
|
419
|
+
tick: { fontSize: 12 },
|
|
420
|
+
className: "text-text-secondary capitalize"
|
|
421
|
+
}),
|
|
422
|
+
/* @__PURE__ */ w(c, {
|
|
423
|
+
tick: { fontSize: 12 },
|
|
424
|
+
className: "text-text-secondary"
|
|
425
|
+
}),
|
|
426
|
+
/* @__PURE__ */ w(r, { formatter: (e) => u(e) }),
|
|
427
|
+
/* @__PURE__ */ w(a, {
|
|
428
|
+
dataKey: "revenue",
|
|
429
|
+
name: "Attributed revenue",
|
|
430
|
+
fill: "var(--color-chart-1)",
|
|
431
|
+
radius: [
|
|
432
|
+
4,
|
|
433
|
+
4,
|
|
434
|
+
0,
|
|
435
|
+
0
|
|
436
|
+
]
|
|
437
|
+
})
|
|
438
|
+
]
|
|
439
|
+
})
|
|
460
440
|
})
|
|
461
|
-
})
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
441
|
+
}), /* @__PURE__ */ T("div", {
|
|
442
|
+
className: "grid grid-cols-1 xl:grid-cols-2 gap-6",
|
|
443
|
+
children: [/* @__PURE__ */ w(h, {
|
|
444
|
+
title: "Channels",
|
|
445
|
+
subtitle: "Credited revenue per channel",
|
|
446
|
+
children: /* @__PURE__ */ w(m, {
|
|
447
|
+
data: Z,
|
|
448
|
+
columns: P,
|
|
449
|
+
pageSize: 8,
|
|
450
|
+
emptyMessage: "No touchpoints recorded for these deals."
|
|
451
|
+
})
|
|
452
|
+
}), /* @__PURE__ */ w(h, {
|
|
453
|
+
title: "Campaigns",
|
|
454
|
+
subtitle: "Credited revenue per campaign",
|
|
455
|
+
children: /* @__PURE__ */ w(m, {
|
|
456
|
+
data: pe,
|
|
457
|
+
columns: me,
|
|
458
|
+
pageSize: 8,
|
|
459
|
+
onRowClick: (e) => {
|
|
460
|
+
e.campaignId && F(I + "/campaigns/" + e.campaignId);
|
|
461
|
+
},
|
|
462
|
+
emptyMessage: "No touchpoints recorded for these deals."
|
|
463
|
+
})
|
|
464
|
+
})]
|
|
465
|
+
})] })
|
|
466
|
+
] })
|
|
467
|
+
}),
|
|
468
|
+
/* @__PURE__ */ w(_, {})
|
|
469
|
+
]
|
|
465
470
|
});
|
|
466
471
|
};
|
|
467
472
|
//#endregion
|