@usgb/forms 1.0.1 → 1.0.2

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/README.md CHANGED
@@ -6,24 +6,24 @@ You pick a predefined `formId`. The package owns fields, validation, consent cop
6
6
 
7
7
  ## What you get
8
8
 
9
- | Artifact | Path / export | Who uses it |
10
- | ------------- | --------------------------------------------------------------- | ----------------------------------- |
11
- | React package | `@usgb/forms` → `dist/index.js` | PWA / any React host |
12
- | Stylesheet | `@usgb/forms/usgb-forms.css` | **Required** for React hosts |
13
- | Web Component | `dist/usgb-forms.js` (also versioned `usgb-forms.<version>.js`) | WordPress and other non-React hosts |
14
- | Catalog | `@usgb/forms/manifest` → `forms-manifest.json` | CMS pickers, docs, tooling |
9
+ | Artifact | Path / export | Who uses it |
10
+ | ------------- | ---------------------------------------------------------------------------------------------------------- | ----------------------------------- |
11
+ | React package | `@usgb/forms` → `dist/index.js` | PWA / any React host |
12
+ | Stylesheet | `@usgb/forms/usgb-forms.css` | **Required** for React hosts |
13
+ | Web Component | `dist/usgb-forms.js` (also versioned `usgb-forms.<version>.js`) | WordPress and other non-React hosts |
14
+ | Catalog | `@usgb/forms/manifest` → `forms-manifest.json` (also versioned `forms-manifest.<version>.json` in `dist/`) | CMS pickers, Gutenberg, tooling |
15
15
 
16
16
  The Web Component script injects the same CSS once on load. React hosts must import the stylesheet themselves.
17
17
 
18
18
  ## Mental model
19
19
 
20
- | You pass | Package already decided |
21
- | -------------------------------- | ------------------------------------------------------------------------------------- |
22
- | `formId` | Fields, required/optional rules, consent bundle, tracking set, layout family (`kind`) |
23
- | `adapter.submit` | Where the payload goes (never an attribute or hardcoded URL) |
24
- | `legalUrls` / `*-url` | Hrefs for package-owned consent copy |
25
- | `heading`, `subheading`, `ctaLabel` | Marketing copy around the form |
26
- | `successMessage` or `successUrl` | Thank-you UX after accept |
20
+ | You pass | Package already decided |
21
+ | ----------------------------------- | ----------------------------------------------------------------------------------- |
22
+ | `formId` | Fields, required/optional rules, consent pins, tracking set, layout family (`kind`) |
23
+ | `adapter.submit` | Where the payload goes (never an attribute or hardcoded URL) |
24
+ | `legalUrls` / `*-url` | Hrefs for package-owned consent copy |
25
+ | `heading`, `subheading`, `ctaLabel` | Marketing copy around the form |
26
+ | `successMessage` or `successUrl` | Thank-you UX after accept |
27
27
 
28
28
  Hosts **must not** invent field lists, consent wording, or tracking keys. New forms are new catalog entries in this package, not host-built schemas.
29
29
 
@@ -31,12 +31,13 @@ Use `listFormDefinitions()` (or the manifest) when a CMS needs a picker of avail
31
31
 
32
32
  ## Available forms
33
33
 
34
- | `formId` | Kind | Fields | Consent | Variants |
35
- | -------------------- | ------------ | --------------------------------------------------------- | ------------------------------ | ------------------------------------------------------- |
36
- | `main-investors-kit` | `lead` | First name, last name, email (required); phone (optional) | TCPA checkbox (`lead-tcpa` v1) | `dense`, `large`, `sidebar`, plus optional `two-column` |
37
- | `newsletter` | `newsletter` | Email only | None | None — omit `variants` / `variant` |
34
+ | `formId` | Kind | Fields | Consent | Variants |
35
+ | --------------------------- | ------------ | --------------------------------------------------------- | ---------------------------------------------------------- | ------------------------------------------------------- |
36
+ | `main-investors-kit` | `lead` | First name, last name, email (required); phone (optional) | Optional TCPA, marketing SMS, and terms/privacy checkboxes | `dense`, `large`, `sidebar`, plus optional `two-column` |
37
+ | `main-investors-kit-notice` | `lead` | Same as kit | Clickwrap notice only (`lead-clickwrap` v1) | `dense`, `large`, `sidebar`, plus optional `two-column` |
38
+ | `newsletter` | `newsletter` | Email only | None | None — omit `variants` / `variant` |
38
39
 
39
- Appearances for both: `on-light` | `on-dark`. Appearance only recolors the form for readability on a light or dark host background — it never sets a background, padding, or radius. The host container owns those.
40
+ Appearances for every catalog form: `on-light` | `on-dark`. Appearance only recolors the form for readability on a light or dark host background — it never sets a background, padding, or radius. The host container owns those.
40
41
 
41
42
  `kind` is the layout family (lead grid vs inline newsletter row). The root exposes `data-kind` for CSS. Several catalog forms can share one kind (e.g. another lead kit that reuses the lead layout).
42
43
 
@@ -69,9 +70,40 @@ Load the built IIFE (styles inject themselves):
69
70
  <script src="https://cdn.example.com/usgb-forms/usgb-forms.1.0.0.js"></script>
70
71
  ```
71
72
 
72
- Exact CDN hostname, path, and versioning scheme are **TBD**. Prefer a versioned filename (`usgb-forms.<version>.js`) so hosts can pin releases.
73
+ Exact CDN hostname, path, and versioning scheme are **TBD**. Prefer versioned filenames (`usgb-forms.<version>.js` and `forms-manifest.<version>.json`) so hosts can pin the script and the CMS picker to the same release. Gutenberg should load that matching manifest — not an unversioned “latest” file — when listing `formId`s.
73
74
 
74
- Until the package is published, you can still develop against a local checkout (`yarn add file:../usgb-forms` or `yarn link`).
75
+ ### Local development (hosts, unpublished)
76
+
77
+ Hosts consume **built** artifacts (`dist/` and root `forms-manifest.json`), not `src/`. Clone this repo next to the host (or anywhere you can path to), then:
78
+
79
+ ```bash
80
+ cd usgb-forms
81
+ yarn install
82
+ yarn build
83
+ ```
84
+
85
+ Rebuild here whenever you change this package. The Vite playground (`yarn dev`) is only for package maintainers; it is not what PWA or WordPress load.
86
+
87
+ **React / PWA.** Point the host at this repo with Yarn 1 `file:` (preferred — the path lives in the host `package.json`, no global link):
88
+
89
+ ```bash
90
+ # from the PWA / React host, path adjusted to your layout
91
+ yarn add file:../usgb-forms
92
+ ```
93
+
94
+ Or set `"@usgb/forms": "file:../usgb-forms"` by hand and run `yarn install`. Imports stay the same (`@usgb/forms`, `@usgb/forms/usgb-forms.css`, `@usgb/forms/manifest`). After each `yarn build` in this repo, run `yarn install` (or `yarn upgrade @usgb/forms`) in the host so Yarn recopies the pack — `file:` does not live-reload.
95
+
96
+ `yarn link` in this repo and `yarn link @usgb/forms` in the host also works, but it can resolve a second copy of React and break hooks. If that happens, alias `@usgb/forms` to the sibling folder in the host bundler instead of linking.
97
+
98
+ **WordPress / Web Component.** Skip the CDN. After `yarn build`, load files from this repo:
99
+
100
+ | Host need | File in this repo |
101
+ | ------------------------ | --------------------------------------------------------------- |
102
+ | Form script | `dist/usgb-forms.js` |
103
+ | Pinned script (optional) | `dist/usgb-forms.<version>.js` |
104
+ | Gutenberg `formId` list | `forms-manifest.json` (or `dist/forms-manifest.<version>.json`) |
105
+
106
+ Copy those into the plugin on its build, or enqueue them from a local static server. A `file:` npm dependency is not required for the Web Component — only a URL (or filesystem path the plugin can enqueue) to the built JS and catalog JSON.
75
107
 
76
108
  ## React (PWA)
77
109
 
@@ -212,19 +244,19 @@ interface HostAdapter {
212
244
 
213
245
  ### Payload shape (summary)
214
246
 
215
- Successful submits send a nested envelope: `formId`, `definitionVersion`, `submissionContractVersion`, `idempotencyKey`, `data` (field values), optional `consent`, and `context` (`host`, `source`, `campaign`, `page`, `tracking`). Exact field and tracking sets come from the form’s catalog entry.
247
+ Successful submits send a nested envelope: `formId`, `definitionVersion`, `submissionContractVersion`, `idempotencyKey`, `data` (field values), optional `consents` (grant booleans, opt-in dates, and `*_consent_language` strings), and `context` (`host`, `source`, `campaign`, `page`, `tracking`). Exact field and tracking sets come from the form’s catalog entry.
216
248
 
217
249
  ## Consent and legal URLs
218
250
 
219
- Consent bundles are versioned and package-owned (checkboxes and/or clickwrap notices). Hosts only supply document **hrefs**.
220
-
221
- - `main-investors-kit` uses `lead-tcpa` v1 and requires `clientAgreement` and `privacyPolicy`.
222
- - PWA Magento defaults: `PWA_LEGAL_URLS` → `/content/client-agreement`, `/content/privacy-policy`.
223
- - WordPress must pass every URL required by the selected consent. A consent form with a missing required URL **does not render**.
224
- - Checkbox values land in `consent.values` (and mirrored in `data`). Notices have no boolean field; the payload still records consent definition id/version.
225
- - Distinct legal wording requires a new consent id/version in this package — not freeform copy from the host.
251
+ Consent policies are versioned and package-owned (checkboxes and/or clickwrap notices). Forms list zero or more pins (`definitionId` + `definitionVersion` + optional `required` for checkboxes). Hosts only supply document **hrefs**.
226
252
 
227
- `LEAD_CLICKWRAP_V1` (“By clicking the button…”) is in the catalog and needs five legal URLs (`privacyPolicy`, `userAgreement`, `marketLossPolicy`, `electronicDisclaimer`, `termsOfSale`). It is not attached to a `formId` until that recipe is chosen.
253
+ - `main-investors-kit` pins `lead-tcpa`, `lead-sms`, and `lead-tospp` (all v1, optional checkboxes). It needs `userAgreement` and `privacyPolicy` for the terms/privacy copy.
254
+ - `main-investors-kit-notice` pins `lead-clickwrap` v1 (notice only). It needs the five clickwrap URLs.
255
+ - PWA Magento defaults (`PWA_LEGAL_URLS`): `/content/client-agreement`, `/content/privacy-policy`, `/content/user-agreement`, `/content/market-loss-policy`, `/content/electronic-disclaimer`, `/content/terms-of-sale`.
256
+ - WordPress must pass every URL required by the selected consents. A form with a missing required URL **does not render**.
257
+ - Checkbox grants land in `consents` only (`tcpa_form_consent_granted`, `sms_form_consent_granted`, `tospp_form_consent_granted`). The exact copy shown is `tcpa_consent_language` (and the matching keys for other policies), even when unchecked.
258
+ - Checking the TCPA box also adds `tcpa_form_opt_in_date` (YYYY-MM-DD). The notice form only sends `clickwrap_consent_language`.
259
+ - Distinct legal wording requires a new consent id/version in this package — not freeform copy from the host. Toggle `consents[].required` on the form recipe when a checkbox must be checked.
228
260
 
229
261
  ## Success behavior
230
262
 
@@ -284,7 +316,24 @@ Appearance never paints a card. Put the form on a dark host surface and pass `ap
284
316
  </div>
285
317
  ```
286
318
 
287
- Visual styles are a ported snapshot of the PWA form kit. When PWA form styles change, update this package and bump the version.
319
+ Visual styles are a ported snapshot of the PWA form kit. When PWA form styles change, update this package and bump `package.json` `version`.
320
+
321
+ ## Versions
322
+
323
+ Day to day, bump **`package.json` `version`** (and set `compatiblePackageVersions` to `^` that version). Push to `main`: npm publishes only if that version is new; S3 always uploads `dist/`. Skipping a package bump **overwrites** the existing `usgb-forms.<version>.js` pin.
324
+
325
+ Patch is enough while nothing is consuming the package. Use minor/major later for compatible vs breaking host API.
326
+
327
+ Everything else is a different object — leave it alone unless that object actually changed:
328
+
329
+ | Field | Bump when |
330
+ | --------------------------------------------- | -------------------------------------------------------------------- |
331
+ | `forms[formId].definitionVersion` | That form’s fields, consent pins, or tracking change |
332
+ | Consent `definitionVersion` in `consents.tsx` | Legal wording changes (new id/version; do not edit in place) |
333
+ | `submissionContract.version` | Submit JSON shape changes (proxies read `submissionContractVersion`) |
334
+ | `schemaVersion` | Manifest JSON keys/shape change (CMS parsers) |
335
+
336
+ Form and consent rules: [`src/definitions/context.md`](src/definitions/context.md).
288
337
 
289
338
  ## Develop (package maintainers)
290
339
 
@@ -0,0 +1,305 @@
1
+ {
2
+ "schemaVersion": "1.0.0",
3
+ "package": {
4
+ "name": "@usgb/forms",
5
+ "compatiblePackageVersions": "^1.0.2"
6
+ },
7
+ "submissionContract": {
8
+ "version": "1.0.0",
9
+ "transport": "server-proxy",
10
+ "payloadShape": "data-and-context"
11
+ },
12
+ "trackingRegistry": {
13
+ "page_url": {
14
+ "destination": "form_submission_url",
15
+ "category": "page",
16
+ "collection": "server",
17
+ "required": true,
18
+ "states": ["collected", "unavailable"],
19
+ "description": "Canonical landing-page URL at submission time"
20
+ },
21
+ "page_title": {
22
+ "destination": "pageName",
23
+ "category": "page",
24
+ "collection": "server",
25
+ "required": false,
26
+ "states": ["collected", "unavailable"]
27
+ },
28
+ "referrer": {
29
+ "destination": "referrer",
30
+ "category": "page",
31
+ "collection": "browser",
32
+ "required": false,
33
+ "states": ["collected", "unavailable"]
34
+ },
35
+ "first_touch_url": {
36
+ "destination": "crossDomain_landing_url",
37
+ "category": "attribution",
38
+ "collection": "host-adapter",
39
+ "required": false,
40
+ "states": ["collected", "unavailable"]
41
+ },
42
+ "utm_source": {
43
+ "destination": "utm_source",
44
+ "category": "attribution",
45
+ "collection": "host-adapter",
46
+ "required": false,
47
+ "states": ["collected", "unavailable"]
48
+ },
49
+ "utm_medium": {
50
+ "destination": "utm_medium",
51
+ "category": "attribution",
52
+ "collection": "host-adapter",
53
+ "required": false,
54
+ "states": ["collected", "unavailable"]
55
+ },
56
+ "utm_campaign": {
57
+ "destination": "utm_campaign",
58
+ "category": "attribution",
59
+ "collection": "host-adapter",
60
+ "required": false,
61
+ "states": ["collected", "unavailable"]
62
+ },
63
+ "utm_term": {
64
+ "destination": "utm_term",
65
+ "category": "attribution",
66
+ "collection": "host-adapter",
67
+ "required": false,
68
+ "states": ["collected", "unavailable"]
69
+ },
70
+ "utm_content": {
71
+ "destination": "utm_content",
72
+ "category": "attribution",
73
+ "collection": "host-adapter",
74
+ "required": false,
75
+ "states": ["collected", "unavailable"]
76
+ },
77
+ "gclid": {
78
+ "destination": "gclid",
79
+ "category": "click-id",
80
+ "collection": "host-adapter",
81
+ "required": false,
82
+ "states": ["collected", "unavailable"]
83
+ },
84
+ "msclkid": {
85
+ "destination": "msclkid",
86
+ "category": "click-id",
87
+ "collection": "host-adapter",
88
+ "required": false,
89
+ "states": ["collected", "unavailable"]
90
+ },
91
+ "gbraid": {
92
+ "destination": "gbraid",
93
+ "category": "click-id",
94
+ "collection": "host-adapter",
95
+ "required": false,
96
+ "states": ["collected", "unavailable"]
97
+ },
98
+ "wbraid": {
99
+ "destination": "wbraid",
100
+ "category": "click-id",
101
+ "collection": "host-adapter",
102
+ "required": false,
103
+ "states": ["collected", "unavailable"]
104
+ },
105
+ "hubspot_utk": {
106
+ "destination": "hubspot_utk",
107
+ "category": "identity",
108
+ "collection": "host-adapter",
109
+ "required": false,
110
+ "states": ["collected", "unavailable", "consent-withheld"]
111
+ },
112
+ "ga_client_id": {
113
+ "destination": "ga_client_id",
114
+ "category": "analytics",
115
+ "collection": "host-adapter",
116
+ "required": false,
117
+ "states": ["collected", "unavailable", "consent-withheld"]
118
+ },
119
+ "ga_session_id": {
120
+ "destination": "session_id_start",
121
+ "category": "analytics",
122
+ "collection": "host-adapter",
123
+ "required": false,
124
+ "states": ["collected", "unavailable", "consent-withheld"]
125
+ },
126
+ "snowplow_id": {
127
+ "destination": "snowplow_id",
128
+ "category": "analytics",
129
+ "collection": "host-adapter",
130
+ "required": false,
131
+ "states": ["collected", "unavailable", "consent-withheld"]
132
+ },
133
+ "vwo_uuid": {
134
+ "destination": "vwo_uuid",
135
+ "category": "experiment",
136
+ "collection": "host-adapter",
137
+ "required": false,
138
+ "states": ["collected", "unavailable", "consent-withheld"]
139
+ },
140
+ "user_agent": {
141
+ "destination": "header_http_client_details",
142
+ "category": "technical",
143
+ "collection": "server",
144
+ "required": false,
145
+ "states": ["collected", "unavailable"]
146
+ },
147
+ "ip_address": {
148
+ "destination": "ipAddress",
149
+ "category": "technical",
150
+ "collection": "server",
151
+ "required": false,
152
+ "states": ["collected", "unavailable"]
153
+ }
154
+ },
155
+ "forms": {
156
+ "main-investors-kit": {
157
+ "definitionVersion": "1",
158
+ "kind": "lead",
159
+ "flow": { "type": "single" },
160
+ "supportedHosts": ["pwa", "wordpress"],
161
+ "fields": [
162
+ { "name": "firstname", "required": true, "group": "name" },
163
+ { "name": "lastname", "required": true, "group": "name" },
164
+ { "name": "email", "required": true },
165
+ { "name": "phone", "required": false }
166
+ ],
167
+ "trackingFields": [
168
+ "page_url",
169
+ "page_title",
170
+ "referrer",
171
+ "first_touch_url",
172
+ "utm_source",
173
+ "utm_medium",
174
+ "utm_campaign",
175
+ "utm_term",
176
+ "utm_content",
177
+ "gclid",
178
+ "msclkid",
179
+ "gbraid",
180
+ "wbraid",
181
+ "hubspot_utk",
182
+ "ga_client_id",
183
+ "ga_session_id",
184
+ "snowplow_id",
185
+ "vwo_uuid",
186
+ "user_agent",
187
+ "ip_address"
188
+ ],
189
+ "ctaLabel": "GET MY FREE GUIDE",
190
+ "consents": [
191
+ {
192
+ "definitionId": "lead-tcpa",
193
+ "definitionVersion": "1",
194
+ "required": false
195
+ },
196
+ {
197
+ "definitionId": "lead-sms",
198
+ "definitionVersion": "1",
199
+ "required": false
200
+ },
201
+ {
202
+ "definitionId": "lead-tospp",
203
+ "definitionVersion": "1",
204
+ "required": false
205
+ }
206
+ ],
207
+ "editor": {
208
+ "label": "Main Investors Kit",
209
+ "description": "Standard lead form: name, email, phone, plus optional TCPA, marketing SMS, and terms/privacy checkboxes. Use on full-width landing pages and PWA kit/sidebar placements.",
210
+ "whenToUse": "Default kit request with optional consent checkboxes. Do not use for affiliate landers or IRA-specific leads.",
211
+ "whenNotToUse": "Affiliate pages (separate definition). IRA kit (separate definition when added). Clickwrap-only kit (`main-investors-kit-notice`).",
212
+ "supportedAppearances": ["on-light", "on-dark"],
213
+ "supportedVariants": ["dense", "large", "sidebar", "two-column"]
214
+ }
215
+ },
216
+ "main-investors-kit-notice": {
217
+ "definitionVersion": "1",
218
+ "kind": "lead",
219
+ "flow": { "type": "single" },
220
+ "supportedHosts": ["pwa", "wordpress"],
221
+ "fields": [
222
+ { "name": "firstname", "required": true, "group": "name" },
223
+ { "name": "lastname", "required": true, "group": "name" },
224
+ { "name": "email", "required": true },
225
+ { "name": "phone", "required": false }
226
+ ],
227
+ "trackingFields": [
228
+ "page_url",
229
+ "page_title",
230
+ "referrer",
231
+ "first_touch_url",
232
+ "utm_source",
233
+ "utm_medium",
234
+ "utm_campaign",
235
+ "utm_term",
236
+ "utm_content",
237
+ "gclid",
238
+ "msclkid",
239
+ "gbraid",
240
+ "wbraid",
241
+ "hubspot_utk",
242
+ "ga_client_id",
243
+ "ga_session_id",
244
+ "snowplow_id",
245
+ "vwo_uuid",
246
+ "user_agent",
247
+ "ip_address"
248
+ ],
249
+ "ctaLabel": "GET MY FREE GUIDE",
250
+ "consents": [
251
+ { "definitionId": "lead-clickwrap", "definitionVersion": "1" }
252
+ ],
253
+ "editor": {
254
+ "label": "Main Investors Kit (clickwrap)",
255
+ "description": "Same fields as Main Investors Kit with a clickwrap notice only — no consent checkboxes.",
256
+ "whenToUse": "Kit request where submit acknowledges legal docs via notice copy instead of checkboxes.",
257
+ "whenNotToUse": "Placements that need TCPA / marketing SMS / terms checkboxes (`main-investors-kit`).",
258
+ "supportedAppearances": ["on-light", "on-dark"],
259
+ "supportedVariants": ["dense", "large", "sidebar", "two-column"]
260
+ }
261
+ },
262
+ "newsletter": {
263
+ "definitionVersion": "1",
264
+ "kind": "newsletter",
265
+ "flow": { "type": "single" },
266
+ "supportedHosts": ["pwa"],
267
+ "fields": [{ "name": "email", "required": true }],
268
+ "trackingFields": [
269
+ "page_url",
270
+ "page_title",
271
+ "referrer",
272
+ "utm_source",
273
+ "utm_medium",
274
+ "utm_campaign",
275
+ "utm_term",
276
+ "utm_content"
277
+ ],
278
+ "ctaLabel": "SUBSCRIBE",
279
+ "editor": {
280
+ "label": "Newsletter",
281
+ "description": "Email-only newsletter signup. No TCPA consent.",
282
+ "whenToUse": "Footer or landing newsletter capture where only an email is required.",
283
+ "whenNotToUse": "Lead kits that need name, phone, or TCPA consent.",
284
+ "supportedAppearances": ["on-light", "on-dark"],
285
+ "supportedVariants": []
286
+ }
287
+ }
288
+ },
289
+ "hostAdapterContract": {
290
+ "hosts": ["pwa", "wordpress"],
291
+ "mayProvide": [
292
+ "browser cookies",
293
+ "URL parameters",
294
+ "page and placement context",
295
+ "host/store identity"
296
+ ],
297
+ "mustNotDefine": [
298
+ "new tracking keys",
299
+ "destination property names",
300
+ "consent definitions",
301
+ "form fields",
302
+ "submission endpoints"
303
+ ]
304
+ }
305
+ }
@@ -2,7 +2,7 @@
2
2
  "schemaVersion": "1.0.0",
3
3
  "package": {
4
4
  "name": "@usgb/forms",
5
- "compatiblePackageVersions": "^1.0.0"
5
+ "compatiblePackageVersions": "^1.0.2"
6
6
  },
7
7
  "submissionContract": {
8
8
  "version": "1.0.0",
@@ -187,20 +187,74 @@
187
187
  "ip_address"
188
188
  ],
189
189
  "ctaLabel": "GET MY FREE GUIDE",
190
- "consent": {
191
- "definitionId": "lead-tcpa",
192
- "definitionVersion": "1",
193
- "required": true,
194
- "submitFields": [
195
- "tcpa_form_consent_granted",
196
- "tcpa_form_opt_in_date"
197
- ]
198
- },
190
+ "consents": [
191
+ {
192
+ "definitionId": "lead-tcpa",
193
+ "definitionVersion": "1",
194
+ "required": false
195
+ },
196
+ {
197
+ "definitionId": "lead-sms",
198
+ "definitionVersion": "1",
199
+ "required": false
200
+ },
201
+ {
202
+ "definitionId": "lead-tospp",
203
+ "definitionVersion": "1",
204
+ "required": false
205
+ }
206
+ ],
199
207
  "editor": {
200
208
  "label": "Main Investors Kit",
201
- "description": "Standard lead form: name, email, phone, TCPA consent. Use on full-width landing pages and PWA kit/sidebar placements.",
202
- "whenToUse": "Default kit request. Do not use for affiliate landers or IRA-specific leads.",
203
- "whenNotToUse": "Affiliate pages (separate definition). IRA kit (separate definition when added).",
209
+ "description": "Standard lead form: name, email, phone, plus optional TCPA, marketing SMS, and terms/privacy checkboxes. Use on full-width landing pages and PWA kit/sidebar placements.",
210
+ "whenToUse": "Default kit request with optional consent checkboxes. Do not use for affiliate landers or IRA-specific leads.",
211
+ "whenNotToUse": "Affiliate pages (separate definition). IRA kit (separate definition when added). Clickwrap-only kit (`main-investors-kit-notice`).",
212
+ "supportedAppearances": ["on-light", "on-dark"],
213
+ "supportedVariants": ["dense", "large", "sidebar", "two-column"]
214
+ }
215
+ },
216
+ "main-investors-kit-notice": {
217
+ "definitionVersion": "1",
218
+ "kind": "lead",
219
+ "flow": { "type": "single" },
220
+ "supportedHosts": ["pwa", "wordpress"],
221
+ "fields": [
222
+ { "name": "firstname", "required": true, "group": "name" },
223
+ { "name": "lastname", "required": true, "group": "name" },
224
+ { "name": "email", "required": true },
225
+ { "name": "phone", "required": false }
226
+ ],
227
+ "trackingFields": [
228
+ "page_url",
229
+ "page_title",
230
+ "referrer",
231
+ "first_touch_url",
232
+ "utm_source",
233
+ "utm_medium",
234
+ "utm_campaign",
235
+ "utm_term",
236
+ "utm_content",
237
+ "gclid",
238
+ "msclkid",
239
+ "gbraid",
240
+ "wbraid",
241
+ "hubspot_utk",
242
+ "ga_client_id",
243
+ "ga_session_id",
244
+ "snowplow_id",
245
+ "vwo_uuid",
246
+ "user_agent",
247
+ "ip_address"
248
+ ],
249
+ "ctaLabel": "GET MY FREE GUIDE",
250
+ "consents": [
251
+ { "definitionId": "lead-clickwrap", "definitionVersion": "1" }
252
+ ],
253
+ "editor": {
254
+ "label": "Main Investors Kit (clickwrap)",
255
+ "description": "Same fields as Main Investors Kit with a clickwrap notice only — no consent checkboxes.",
256
+ "whenToUse": "Kit request where submit acknowledges legal docs via notice copy instead of checkboxes.",
257
+ "whenNotToUse": "Placements that need TCPA / marketing SMS / terms checkboxes (`main-investors-kit`).",
204
258
  "supportedAppearances": ["on-light", "on-dark"],
205
259
  "supportedVariants": ["dense", "large", "sidebar", "two-column"]
206
260
  }