@aglyn/plugins-marketing 1.0.0-beta.143
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/LICENSE +201 -0
- package/README.md +7 -0
- package/package.json +56 -0
- package/src/index.d.ts +19 -0
- package/src/index.js +20 -0
- package/src/index.js.map +1 -0
- package/src/lib/components/announcement-bar-card.component.d.ts +20 -0
- package/src/lib/components/announcement-bar-card.component.js +292 -0
- package/src/lib/components/announcement-bar-card.component.js.map +1 -0
- package/src/lib/components/campaign-composer.d.ts +84 -0
- package/src/lib/components/campaign-composer.js +1643 -0
- package/src/lib/components/campaign-composer.js.map +1 -0
- package/src/lib/components/campaign-conversions-card.d.ts +22 -0
- package/src/lib/components/campaign-conversions-card.js +642 -0
- package/src/lib/components/campaign-conversions-card.js.map +1 -0
- package/src/lib/components/campaign-detail-card.d.ts +55 -0
- package/src/lib/components/campaign-detail-card.js +771 -0
- package/src/lib/components/campaign-detail-card.js.map +1 -0
- package/src/lib/components/campaign-edit-drawer.d.ts +60 -0
- package/src/lib/components/campaign-edit-drawer.js +252 -0
- package/src/lib/components/campaign-edit-drawer.js.map +1 -0
- package/src/lib/components/campaign-email-zones.d.ts +111 -0
- package/src/lib/components/campaign-email-zones.js +54 -0
- package/src/lib/components/campaign-email-zones.js.map +1 -0
- package/src/lib/components/campaign-glance-card.component.d.ts +18 -0
- package/src/lib/components/campaign-glance-card.component.js +151 -0
- package/src/lib/components/campaign-glance-card.component.js.map +1 -0
- package/src/lib/components/campaign-members-section.d.ts +87 -0
- package/src/lib/components/campaign-members-section.js +499 -0
- package/src/lib/components/campaign-members-section.js.map +1 -0
- package/src/lib/components/campaign-reach-sections.d.ts +137 -0
- package/src/lib/components/campaign-reach-sections.js +694 -0
- package/src/lib/components/campaign-reach-sections.js.map +1 -0
- package/src/lib/components/campaign-report-card.d.ts +91 -0
- package/src/lib/components/campaign-report-card.js +667 -0
- package/src/lib/components/campaign-report-card.js.map +1 -0
- package/src/lib/components/campaign-test-send-drawer.d.ts +45 -0
- package/src/lib/components/campaign-test-send-drawer.js +238 -0
- package/src/lib/components/campaign-test-send-drawer.js.map +1 -0
- package/src/lib/components/campaigns-card.d.ts +31 -0
- package/src/lib/components/campaigns-card.js +667 -0
- package/src/lib/components/campaigns-card.js.map +1 -0
- package/src/lib/components/conversion-attribution.component.d.ts +62 -0
- package/src/lib/components/conversion-attribution.component.js +127 -0
- package/src/lib/components/conversion-attribution.component.js.map +1 -0
- package/src/lib/components/email-compose-card.d.ts +12 -0
- package/src/lib/components/email-compose-card.js +157 -0
- package/src/lib/components/email-compose-card.js.map +1 -0
- package/src/lib/components/email-detail.d.ts +40 -0
- package/src/lib/components/email-detail.js +1180 -0
- package/src/lib/components/email-detail.js.map +1 -0
- package/src/lib/components/email-edit-drawer.d.ts +54 -0
- package/src/lib/components/email-edit-drawer.js +172 -0
- package/src/lib/components/email-edit-drawer.js.map +1 -0
- package/src/lib/components/email-messages-widget.d.ts +22 -0
- package/src/lib/components/email-messages-widget.js +49 -0
- package/src/lib/components/email-messages-widget.js.map +1 -0
- package/src/lib/components/email-recipients-card.d.ts +50 -0
- package/src/lib/components/email-recipients-card.js +338 -0
- package/src/lib/components/email-recipients-card.js.map +1 -0
- package/src/lib/components/emails-list-card.d.ts +36 -0
- package/src/lib/components/emails-list-card.js +544 -0
- package/src/lib/components/emails-list-card.js.map +1 -0
- package/src/lib/components/experiment-zones.d.ts +78 -0
- package/src/lib/components/experiment-zones.js +65 -0
- package/src/lib/components/experiment-zones.js.map +1 -0
- package/src/lib/components/host-experiments-card.component.d.ts +17 -0
- package/src/lib/components/host-experiments-card.component.js +887 -0
- package/src/lib/components/host-experiments-card.component.js.map +1 -0
- package/src/lib/components/host-marketing-summary-card.component.d.ts +15 -0
- package/src/lib/components/host-marketing-summary-card.component.js +161 -0
- package/src/lib/components/host-marketing-summary-card.component.js.map +1 -0
- package/src/lib/components/host-overlays-card.component.d.ts +19 -0
- package/src/lib/components/host-overlays-card.component.js +783 -0
- package/src/lib/components/host-overlays-card.component.js.map +1 -0
- package/src/lib/components/marketing-console-page.d.ts +28 -0
- package/src/lib/components/marketing-console-page.js +166 -0
- package/src/lib/components/marketing-console-page.js.map +1 -0
- package/src/lib/components/marketing-console-sections.d.ts +34 -0
- package/src/lib/components/marketing-console-sections.js +77 -0
- package/src/lib/components/marketing-console-sections.js.map +1 -0
- package/src/lib/components/overlay-stats-row.component.d.ts +15 -0
- package/src/lib/components/overlay-stats-row.component.js +78 -0
- package/src/lib/components/overlay-stats-row.component.js.map +1 -0
- package/src/lib/components/popup-card.component.d.ts +18 -0
- package/src/lib/components/popup-card.component.js +462 -0
- package/src/lib/components/popup-card.component.js.map +1 -0
- package/src/lib/components/record-attribution-widget.d.ts +35 -0
- package/src/lib/components/record-attribution-widget.js +33 -0
- package/src/lib/components/record-attribution-widget.js.map +1 -0
- package/src/lib/components/site-runtime.d.ts +9 -0
- package/src/lib/components/site-runtime.js +1081 -0
- package/src/lib/components/site-runtime.js.map +1 -0
- package/src/lib/components/use-campaign-send-api.d.ts +35 -0
- package/src/lib/components/use-campaign-send-api.js +99 -0
- package/src/lib/components/use-campaign-send-api.js.map +1 -0
- package/src/lib/components/use-campaign-topic-options.d.ts +20 -0
- package/src/lib/components/use-campaign-topic-options.js +44 -0
- package/src/lib/components/use-campaign-topic-options.js.map +1 -0
- package/src/lib/components/use-emails-hub-path.d.ts +39 -0
- package/src/lib/components/use-emails-hub-path.js +70 -0
- package/src/lib/components/use-emails-hub-path.js.map +1 -0
- package/src/lib/components/use-marketing-hub-path.d.ts +21 -0
- package/src/lib/components/use-marketing-hub-path.js +50 -0
- package/src/lib/components/use-marketing-hub-path.js.map +1 -0
- package/src/lib/components/use-overlay-copy-editor.d.ts +79 -0
- package/src/lib/components/use-overlay-copy-editor.js +110 -0
- package/src/lib/components/use-overlay-copy-editor.js.map +1 -0
- package/src/lib/constants/bundle-common.d.ts +8 -0
- package/src/lib/constants/bundle-common.js +9 -0
- package/src/lib/constants/bundle-common.js.map +1 -0
- package/src/lib/model/campaign-membership-figures.d.ts +109 -0
- package/src/lib/model/campaign-membership-figures.js +113 -0
- package/src/lib/model/campaign-membership-figures.js.map +1 -0
- package/src/lib/model/compile-client-automations.d.ts +65 -0
- package/src/lib/model/compile-client-automations.js +95 -0
- package/src/lib/model/compile-client-automations.js.map +1 -0
- package/src/lib/model/experiments.d.ts +130 -0
- package/src/lib/model/experiments.js +186 -0
- package/src/lib/model/experiments.js.map +1 -0
- package/src/lib/model/index.d.ts +26 -0
- package/src/lib/model/index.js +26 -0
- package/src/lib/model/index.js.map +1 -0
- package/src/lib/model/marketing-record-routes.d.ts +6 -0
- package/src/lib/model/marketing-record-routes.js +46 -0
- package/src/lib/model/marketing-record-routes.js.map +1 -0
- package/src/lib/model/overlay-copy.d.ts +62 -0
- package/src/lib/model/overlay-copy.js +78 -0
- package/src/lib/model/overlay-copy.js.map +1 -0
- package/src/lib/model/overlays.d.ts +113 -0
- package/src/lib/model/overlays.js +93 -0
- package/src/lib/model/overlays.js.map +1 -0
- package/src/lib/model/site-contract.d.ts +100 -0
- package/src/lib/model/site-contract.js +23 -0
- package/src/lib/model/site-contract.js.map +1 -0
- package/src/lib/plugin.d.ts +27 -0
- package/src/lib/plugin.js +168 -0
- package/src/lib/plugin.js.map +1 -0
- package/src/lib/preview-props.d.ts +31 -0
- package/src/lib/preview-props.js +54 -0
- package/src/lib/preview-props.js.map +1 -0
- package/src/lib/server/campaign-manage.d.ts +62 -0
- package/src/lib/server/campaign-manage.js +829 -0
- package/src/lib/server/campaign-manage.js.map +1 -0
- package/src/lib/server/campaign-process-scheduled.d.ts +26 -0
- package/src/lib/server/campaign-process-scheduled.js +198 -0
- package/src/lib/server/campaign-process-scheduled.js.map +1 -0
- package/src/lib/server/campaign-recipients.d.ts +55 -0
- package/src/lib/server/campaign-recipients.js +219 -0
- package/src/lib/server/campaign-recipients.js.map +1 -0
- package/src/lib/server/campaign-send.d.ts +487 -0
- package/src/lib/server/campaign-send.js +3157 -0
- package/src/lib/server/campaign-send.js.map +1 -0
- package/src/lib/server/email-campaign-reach.d.ts +174 -0
- package/src/lib/server/email-campaign-reach.js +254 -0
- package/src/lib/server/email-campaign-reach.js.map +1 -0
- package/src/lib/server/email-events.d.ts +27 -0
- package/src/lib/server/email-events.js +714 -0
- package/src/lib/server/email-events.js.map +1 -0
- package/src/lib/server/get-client-automations.d.ts +60 -0
- package/src/lib/server/get-client-automations.js +87 -0
- package/src/lib/server/get-client-automations.js.map +1 -0
- package/src/lib/server/get-overlays.d.ts +28 -0
- package/src/lib/server/get-overlays.js +65 -0
- package/src/lib/server/get-overlays.js.map +1 -0
- package/src/lib/server/get-screen-experiments.d.ts +42 -0
- package/src/lib/server/get-screen-experiments.js +82 -0
- package/src/lib/server/get-screen-experiments.js.map +1 -0
- package/src/lib/server/lists-materialize.d.ts +18 -0
- package/src/lib/server/lists-materialize.js +130 -0
- package/src/lib/server/lists-materialize.js.map +1 -0
- package/src/lib/server/marketing-figures.d.ts +37 -0
- package/src/lib/server/marketing-figures.js +248 -0
- package/src/lib/server/marketing-figures.js.map +1 -0
- package/src/lib/server/site-page-enricher.d.ts +26 -0
- package/src/lib/server/site-page-enricher.js +210 -0
- package/src/lib/server/site-page-enricher.js.map +1 -0
- package/src/lib/server.d.ts +20 -0
- package/src/lib/server.js +152 -0
- package/src/lib/server.js.map +1 -0
- package/src/lib/site.d.ts +22 -0
- package/src/lib/site.js +48 -0
- package/src/lib/site.js.map +1 -0
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
export interface CampaignReachProps {
|
|
2
|
+
hostId: string;
|
|
3
|
+
/**
|
|
4
|
+
* The campaign's emails, by send id — the handle both collections join on.
|
|
5
|
+
*
|
|
6
|
+
* A stable array is not required: both sections key their reads on the
|
|
7
|
+
* joined string, so a caller rebuilding the array every render pays for one
|
|
8
|
+
* set of reads rather than one per render.
|
|
9
|
+
*/
|
|
10
|
+
sendIds: readonly string[];
|
|
11
|
+
/** The campaign holds more emails than `sendIds` names. */
|
|
12
|
+
truncated: boolean;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* WHAT THE CAMPAIGN CAUSED, counted rather than listed.
|
|
16
|
+
*
|
|
17
|
+
* Four aggregation counts over `campaignAttributions`, one per kind, each
|
|
18
|
+
* narrowed to this campaign's own sends. An aggregation is billed per
|
|
19
|
+
* thousand index entries rather than per document, so the honest figure costs
|
|
20
|
+
* about as much as a single row — which is what lets this run on mount
|
|
21
|
+
* instead of behind a button. Listing the records would not: that is the
|
|
22
|
+
* per-record read every figure on this page is arranged to avoid, and the
|
|
23
|
+
* site-wide Conversions section already lists them.
|
|
24
|
+
*
|
|
25
|
+
* The composite index the query needs — `kind` then `campaignId` — is already
|
|
26
|
+
* declared for the conversions list's own campaign-scoped view, and an `in`
|
|
27
|
+
* runs as a disjunction of equalities against that same index.
|
|
28
|
+
*
|
|
29
|
+
* ## The kinds are never added together
|
|
30
|
+
*
|
|
31
|
+
* One form submission by a new person writes a submission, a contact AND a
|
|
32
|
+
* lead: three true statements about one visit. A total would count that visit
|
|
33
|
+
* three times and would look exactly like a bigger number, so there is no
|
|
34
|
+
* total here and the note under the figures says why.
|
|
35
|
+
*/
|
|
36
|
+
export declare function CampaignConversionsSection(props: CampaignReachProps & {
|
|
37
|
+
/** The marketing hub URL, for the site-wide conversions list. */
|
|
38
|
+
basePath: string;
|
|
39
|
+
}): import("react").JSX.Element;
|
|
40
|
+
export declare namespace CampaignConversionsSection {
|
|
41
|
+
var displayName: string;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* WHAT THE CAMPAIGN EARNED — per currency, and never across them.
|
|
45
|
+
*
|
|
46
|
+
* The same question a campaign of one email answers, answered the same way by
|
|
47
|
+
* a campaign of several: how many messages a container happens to hold is not
|
|
48
|
+
* a fact about whether its revenue is knowable. So this is the same section
|
|
49
|
+
* the single-send report carries — `Revenue`, in the same place in the page's
|
|
50
|
+
* order, drawn by the same money components — over a merge rather than over
|
|
51
|
+
* one document.
|
|
52
|
+
*
|
|
53
|
+
* ## Why it takes a merge, and what the merge may not do
|
|
54
|
+
*
|
|
55
|
+
* `reports/revenue` is written per SEND. There is no container-level rollup
|
|
56
|
+
* and there should not be one: it would have to be kept true against every
|
|
57
|
+
* order and every refund of every email in the campaign, duplicating figures
|
|
58
|
+
* that are already correct one level down. So the campaign's figure is one
|
|
59
|
+
* document per email and an addition — and the addition is the danger.
|
|
60
|
+
*
|
|
61
|
+
* **Currency is to money what kind is to a conversion.** The section above
|
|
62
|
+
* refuses to total form submissions with leads because one visit writes both;
|
|
63
|
+
* this refuses to total USD with EUR because the sum has no unit. Both
|
|
64
|
+
* refusals are structural rather than remembered:
|
|
65
|
+
* {@link campaignRevenueAcrossSends} keys its accumulator on the currency, so
|
|
66
|
+
* amounts in different currencies never reach the same addition, and the
|
|
67
|
+
* result carries no combined field for a screen to print.
|
|
68
|
+
*
|
|
69
|
+
* ## One currency reads as one figure; several read as several
|
|
70
|
+
*
|
|
71
|
+
* The common case is one currency, and it is drawn exactly as a single
|
|
72
|
+
* email's report draws it — net, gross, refunded, orders — with no currency
|
|
73
|
+
* heading, because a label saying `USD` over a page that only ever shows
|
|
74
|
+
* dollars is noise. The moment a second currency appears every block gets its
|
|
75
|
+
* code as a heading and its own email count, and a caveat says in words what
|
|
76
|
+
* the headings say in layout: these do not add up, and nothing here converts
|
|
77
|
+
* between them. The rare case pays for itself; the common one does not pay
|
|
78
|
+
* for the rare one.
|
|
79
|
+
*
|
|
80
|
+
* ## Behind a button, and the button says the price
|
|
81
|
+
*
|
|
82
|
+
* One document per email — the per-record read the conversions section above
|
|
83
|
+
* is shaped to avoid. That section can run on mount because an aggregation is
|
|
84
|
+
* billed per thousand index entries, so its four honest figures cost about as
|
|
85
|
+
* much as a single row however large the campaign is. This cannot: fifty
|
|
86
|
+
* emails is fifty document reads, every time the page opens, for a section
|
|
87
|
+
* most readers of a campaign are not opening the page for. So it is asked
|
|
88
|
+
* for, at the same control and in the same words as the destinations section
|
|
89
|
+
* below, which buys its rows the same way.
|
|
90
|
+
*
|
|
91
|
+
* ## Nothing, and nothing readable, are different sentences
|
|
92
|
+
*
|
|
93
|
+
* The rollup is created by the writer on the first order it credits, so an
|
|
94
|
+
* email with no record has never earned. A campaign where NO email has one
|
|
95
|
+
* has not been shown to have earned nothing — it is also every campaign sent
|
|
96
|
+
* before the join existed and every campaign on a site with no store, which
|
|
97
|
+
* is the distinction the single-send report draws in the same two sentences.
|
|
98
|
+
* A read that is REFUSED shows neither: the figures are withheld behind a
|
|
99
|
+
* warning, and any figures already on screen are dropped rather than left
|
|
100
|
+
* standing beside it, because a stale total under a fresh error is the one
|
|
101
|
+
* arrangement that looks authoritative and is not.
|
|
102
|
+
*/
|
|
103
|
+
export declare function CampaignRevenueSection(props: CampaignReachProps): import("react").JSX.Element;
|
|
104
|
+
export declare namespace CampaignRevenueSection {
|
|
105
|
+
var displayName: string;
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* WHERE THE CAMPAIGN SENT PEOPLE — the pages its mail pointed at.
|
|
109
|
+
*
|
|
110
|
+
* The union of `campaigns/{sendId}/reports/links` across the campaign's
|
|
111
|
+
* emails, which is the closest the stored data comes to "the surfaces this
|
|
112
|
+
* campaign runs across". It is observed rather than declared: a page is on
|
|
113
|
+
* this list because a link in this campaign's mail was followed to it.
|
|
114
|
+
*
|
|
115
|
+
* ## Behind a button, and the button says the price
|
|
116
|
+
*
|
|
117
|
+
* One document per email, up to the ceiling the page holds — which is the
|
|
118
|
+
* per-record read the figures above are shaped to avoid, so it is asked for
|
|
119
|
+
* rather than paid on mount. The same bargain the conversions list makes for
|
|
120
|
+
* its landing-page grouping.
|
|
121
|
+
*
|
|
122
|
+
* ## What a row is, and what it is not
|
|
123
|
+
*
|
|
124
|
+
* A destination is the link's address with its query string dropped, because
|
|
125
|
+
* a campaign body is merged per recipient and a personalised query would mint
|
|
126
|
+
* one row per person — and could carry that person's address into an
|
|
127
|
+
* aggregate the whole team reads. The cost is that two links to one page
|
|
128
|
+
* distinguished only by their tracking parameters are one row, which the note
|
|
129
|
+
* under the table states rather than leaving the reader to discover.
|
|
130
|
+
*
|
|
131
|
+
* Clicks are EVENTS. One reader clicking twice counts twice, so a destination
|
|
132
|
+
* total is not a count of people.
|
|
133
|
+
*/
|
|
134
|
+
export declare function CampaignDestinationsSection(props: CampaignReachProps): import("react").JSX.Element;
|
|
135
|
+
export declare namespace CampaignDestinationsSection {
|
|
136
|
+
var displayName: string;
|
|
137
|
+
}
|