Pricing flow: model picker first, then model-specific price ranges
deploy / build-and-publish (push) Successful in 40s
deploy / build-and-publish (push) Successful in 40s
- Q0 'Which pricing model would you prefer?' (monthly / annual / per
project radios) gates the four PSM questions; picking a model reveals
question 1 and swaps each question's ranges to that model's set
(switching model clears previous answers)
- ranges: monthly and per-project unchanged (€0/10/25/50/100+); annual
€0/50/150/300/500 (tops at €500 per Keith's gut - to be tested)
- questions reworded model-neutral ('At what price...' instead of
'monthly price')
- analytics: price-model-<model> for the picker, price-<model>-<question>-<option>
per answer; Zoho payload gains price_model plus the usual question=option
pairs
- CMS config: price_models list (key/label/options) + price_model_question;
price_groups simplified to key/heading; preview mirrors the flow
This commit is contained in:
1 parent
f3bdd925d5
commit
7bac903809
5 files changed
+137
-96
No files matched your search
+14
-7
@@ -77,20 +77,27 @@ collections:
|
|||||||
- { label: Step text (optional), name: text, widget: string, required: false }
|
- { label: Step text (optional), name: text, widget: string, required: false }
|
||||||
- { label: Journey heading, name: journey_title, widget: string, required: false }
|
- { label: Journey heading, name: journey_title, widget: string, required: false }
|
||||||
- { label: Journey note, name: journey_note, widget: text, required: false }
|
- { label: Journey note, name: journey_note, widget: text, required: false }
|
||||||
- label: Price questions (founders page, optional)
|
- { label: Pricing model question (founders page), name: price_model_question, widget: string, required: false }
|
||||||
name: price_groups
|
- label: Pricing models (each carries its own price ranges)
|
||||||
|
name: price_models
|
||||||
widget: list
|
widget: list
|
||||||
required: false
|
required: false
|
||||||
hint: Rendered as radio buttons, one question revealed at a time in list order
|
|
||||||
fields:
|
fields:
|
||||||
- { label: Question key (lowercase_with_underscores), name: key, widget: string }
|
- { label: Model key (lowercase_with_underscores), name: key, widget: string }
|
||||||
- { label: Question shown to the visitor, name: heading, widget: string }
|
- { label: Label shown to the visitor, name: label, widget: string }
|
||||||
- label: Price options
|
- label: Price options for this model
|
||||||
name: options
|
name: options
|
||||||
widget: list
|
widget: list
|
||||||
fields:
|
fields:
|
||||||
- { label: Option key (e.g. eur25 — also the analytics event name), name: key, widget: string }
|
- { label: Option key (e.g. eur25), name: key, widget: string }
|
||||||
- { label: Label (e.g. €25), name: label, widget: string }
|
- { label: Label (e.g. €25), name: label, widget: string }
|
||||||
|
- label: Price questions (founders page, optional — shown one at a time after a model is picked)
|
||||||
|
name: price_groups
|
||||||
|
widget: list
|
||||||
|
required: false
|
||||||
|
fields:
|
||||||
|
- { label: Question key (lowercase_with_underscores), name: key, widget: string }
|
||||||
|
- { label: Question shown to the visitor, name: heading, widget: string }
|
||||||
- { label: Price checklist heading, name: price_title, widget: string, required: false }
|
- { label: Price checklist heading, name: price_title, widget: string, required: false }
|
||||||
- { label: Price checklist note, name: price_note, widget: text, required: false }
|
- { label: Price checklist note, name: price_note, widget: text, required: false }
|
||||||
- label: Tracked checklist (hubs roadmap, founders what-matters — optional)
|
- label: Tracked checklist (hubs roadmap, founders what-matters — optional)
|
||||||
|
|||||||
+18
-5
@@ -37,6 +37,8 @@ const css = `
|
|||||||
.pv-price strong { font-size:0.95rem; }
|
.pv-price strong { font-size:0.95rem; }
|
||||||
fieldset.pv-pricegroup, .pv-pricegroup { border:0; margin:1.1rem 0 0; padding:0; }
|
fieldset.pv-pricegroup, .pv-pricegroup { border:0; margin:1.1rem 0 0; padding:0; }
|
||||||
.pv-pricegroup legend { font-weight:600; font-size:1rem; margin-bottom:0.4rem; color:var(--ink); }
|
.pv-pricegroup legend { font-weight:600; font-size:1rem; margin-bottom:0.4rem; color:var(--ink); }
|
||||||
|
.pv-modelq { font-weight:600; margin:1.4rem 0 0.4rem; }
|
||||||
|
.pv-models { display:flex; gap:0.5rem; flex-wrap:wrap; }
|
||||||
.pv-journey ol { list-style:none; padding:0; margin:0.5rem 0 0; display:grid; gap:0.55rem; }
|
.pv-journey ol { list-style:none; padding:0; margin:0.5rem 0 0; display:grid; gap:0.55rem; }
|
||||||
.pv-journey li { padding:0.55rem 0.9rem; background:#fff; border:1px solid var(--line); border-inline-start:3px solid var(--accent); border-radius:0.45rem; color:var(--muted); font-size:0.95rem; }
|
.pv-journey li { padding:0.55rem 0.9rem; background:#fff; border:1px solid var(--line); border-inline-start:3px solid var(--accent); border-radius:0.45rem; color:var(--muted); font-size:0.95rem; }
|
||||||
.pv-journey li b { color:var(--ink); }
|
.pv-journey li b { color:var(--ink); }
|
||||||
@@ -62,6 +64,7 @@ const PagePreview = ({ entry, widgetFor, widgetsFor }) => {
|
|||||||
const journey = items(widgetsFor("journey"));
|
const journey = items(widgetsFor("journey"));
|
||||||
const caps = items(widgetsFor("capabilities"));
|
const caps = items(widgetsFor("capabilities"));
|
||||||
const priceGroups = items(widgetsFor("price_groups"));
|
const priceGroups = items(widgetsFor("price_groups"));
|
||||||
|
const priceModels = items(widgetsFor("price_models"));
|
||||||
const hasHero = d("hero_headline") || d("hero_sub");
|
const hasHero = d("hero_headline") || d("hero_sub");
|
||||||
|
|
||||||
return html`
|
return html`
|
||||||
@@ -120,18 +123,28 @@ const PagePreview = ({ entry, widgetFor, widgetsFor }) => {
|
|||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
`}
|
`}
|
||||||
${priceGroups.length > 0 &&
|
${(priceGroups.length > 0 && priceModels.length > 0) &&
|
||||||
html`
|
html`
|
||||||
<section>
|
<section>
|
||||||
<h2>${d("price_title")}</h2>
|
<h2>${d("price_title")}</h2>
|
||||||
${d("price_note") &&
|
${d("price_note") &&
|
||||||
html`<p data-key-path="price_note" tabindex="0">${d("price_note")}</p>`}
|
html`<p data-key-path="price_note" tabindex="0">${d("price_note")}</p>`}
|
||||||
|
<p class="pv-modelq">${d("price_model_question")}</p>
|
||||||
|
<div class="pv-models">
|
||||||
|
${priceModels.map((m, i) =>
|
||||||
|
html`<span class="pv-price" data-key-path={"price_models." + i + ".label"} tabindex="0">
|
||||||
|
<span class="tick"></span>
|
||||||
|
<strong>${m.get("label")}</strong>
|
||||||
|
</span>`,
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
${priceGroups.map((g, i) => {
|
${priceGroups.map((g, i) => {
|
||||||
const opts = Array.from(g.get("options") || []);
|
const firstModel = priceModels[0];
|
||||||
return html`<fieldset class="pv-pricegroup" data-key-path={`price_groups.${i}.heading`} tabindex="0">
|
const opts = firstModel ? Array.from(firstModel.get("options") || []) : [];
|
||||||
|
return html`<fieldset class="pv-pricegroup" data-key-path={"price_groups." + i + ".heading"} tabindex="0">
|
||||||
<legend>${g.get("heading")}</legend>
|
<legend>${g.get("heading")}</legend>
|
||||||
${opts.map((o, j) =>
|
${opts.map((o, j) =>
|
||||||
html`<span class="pv-price" data-key-path={`price_groups.${i}.options.${j}.label`} tabindex="0">
|
html`<span class="pv-price" data-key-path={`price_groups.${i}.heading`} tabindex="0">
|
||||||
<span class="tick"></span>
|
<span class="tick"></span>
|
||||||
<strong>${o.get("label")}</strong>
|
<strong>${o.get("label")}</strong>
|
||||||
</span>`,
|
</span>`,
|
||||||
@@ -178,7 +191,7 @@ const PagePreview = ({ entry, widgetFor, widgetsFor }) => {
|
|||||||
valueProps.length === 0 &&
|
valueProps.length === 0 &&
|
||||||
journey.length === 0 &&
|
journey.length === 0 &&
|
||||||
caps.length === 0 &&
|
caps.length === 0 &&
|
||||||
priceGroups.length === 0 &&
|
priceGroups.length === 0 && priceModels.length === 0 &&
|
||||||
!d("pilot_text")) &&
|
!d("pilot_text")) &&
|
||||||
html`<p class="pv-empty">No structured sections — the preview shows the body only.</p>`}
|
html`<p class="pv-empty">No structured sections — the preview shows the body only.</p>`}
|
||||||
</main>
|
</main>
|
||||||
|
|||||||
@@ -131,6 +131,9 @@ const note = type === "founders" ? strings.form_founders_note : strings.form_hub
|
|||||||
// not the checkbox's literal "on"; an unchecked box never arrives)
|
// not the checkbox's literal "on"; an unchecked box never arrives)
|
||||||
payload.consent = data.get("consent") === "on";
|
payload.consent = data.get("consent") === "on";
|
||||||
if (payload.website) return; // honeypot: pretend success, send nothing
|
if (payload.website) return; // honeypot: pretend success, send nothing
|
||||||
|
// the pricing-model picker lives outside the <form> element
|
||||||
|
const modelPick = document.querySelector('input[name="price_model"]:checked');
|
||||||
|
if (modelPick) payload.price_model = modelPick.value;
|
||||||
button.disabled = true;
|
button.disabled = true;
|
||||||
button.textContent = STRINGS.sending || "Sending…";
|
button.textContent = STRINGS.sending || "Sending…";
|
||||||
try {
|
try {
|
||||||
|
|||||||
+71
-31
@@ -273,29 +273,46 @@ const hasForm = isAudiencePage;
|
|||||||
|
|
||||||
<slot />
|
<slot />
|
||||||
{
|
{
|
||||||
|
Array.isArray(fm.price_models) && fm.price_models.length > 0 &&
|
||||||
Array.isArray(fm.price_groups) && fm.price_groups.length > 0 && (
|
Array.isArray(fm.price_groups) && fm.price_groups.length > 0 && (
|
||||||
<section class="pricing">
|
<section class="pricing">
|
||||||
<h2>{fm.price_title}</h2>
|
<h2>{fm.price_title}</h2>
|
||||||
{fm.price_note && <p class="pricing-note">{fm.price_note}</p>}
|
{fm.price_note && <p class="pricing-note">{fm.price_note}</p>}
|
||||||
{fm.price_groups.map((g, i) => (
|
<fieldset class="price-group model-picker">
|
||||||
<fieldset class="price-group" hidden={i > 0}>
|
<legend>{fm.price_model_question}</legend>
|
||||||
|
<div class="cards price-list">
|
||||||
|
{fm.price_models.map((m) => (
|
||||||
|
<label class="card cap">
|
||||||
|
<input type="radio" name="price_model" value={m.key} data-model-pick={m.key} />
|
||||||
|
<span class="cap-body">
|
||||||
|
<strong>{m.label}</strong>
|
||||||
|
</span>
|
||||||
|
</label>
|
||||||
|
))}
|
||||||
|
</div>
|
||||||
|
</fieldset>
|
||||||
|
{fm.price_groups.map((g) => (
|
||||||
|
<fieldset class="price-group" hidden>
|
||||||
<legend>{g.heading}</legend>
|
<legend>{g.heading}</legend>
|
||||||
<div class="cards price-list">
|
{fm.price_models.map((m) => (
|
||||||
{g.options.map((o) => (
|
<div class="cards price-list model-set" data-model-set={m.key}>
|
||||||
<label class="card cap" data-umami-event={`price-${g.key}-${o.key}`}>
|
{m.options.map((o) => (
|
||||||
<input
|
<label class="card cap price-opt" data-model={m.key}>
|
||||||
type="radio"
|
<input
|
||||||
name={`price-${g.key}`}
|
type="radio"
|
||||||
data-price={o.key}
|
name={`price-${g.key}`}
|
||||||
data-price-group={g.key}
|
data-price={o.key}
|
||||||
data-price-label={o.label}
|
data-price-group={g.key}
|
||||||
/>
|
data-price-model={m.key}
|
||||||
<span class="cap-body">
|
data-price-label={o.label}
|
||||||
<strong>{o.label}</strong>
|
/>
|
||||||
</span>
|
<span class="cap-body">
|
||||||
</label>
|
<strong>{o.label}</strong>
|
||||||
))}
|
</span>
|
||||||
</div>
|
</label>
|
||||||
|
))}
|
||||||
|
</div>
|
||||||
|
))}
|
||||||
</fieldset>
|
</fieldset>
|
||||||
))}
|
))}
|
||||||
</section>
|
</section>
|
||||||
@@ -358,19 +375,40 @@ const hasForm = isAudiencePage;
|
|||||||
window.umami && window.umami.track(el.dataset.umamiEvent, { selected: !!el.checked });
|
window.umami && window.umami.track(el.dataset.umamiEvent, { selected: !!el.checked });
|
||||||
} catch {}
|
} catch {}
|
||||||
});
|
});
|
||||||
// Progressive price questions: answering one reveals the next
|
// Pricing flow: pick a model first, then the four questions appear
|
||||||
// (fieldsets after the first ship hidden; radios answer each).
|
// one at a time, each showing only the selected model's price
|
||||||
document.addEventListener("change", (event) => {
|
// ranges. Switching model clears previous answers.
|
||||||
const el = event.target;
|
const pricing = document.querySelector("section.pricing");
|
||||||
if (!el || !el.matches || !el.matches("[data-price]")) return;
|
if (pricing) {
|
||||||
const group = el.closest("fieldset.price-group");
|
const sets = pricing.querySelectorAll(".model-set");
|
||||||
if (!group) return;
|
const groups = [...pricing.querySelectorAll("fieldset.price-group:not(.model-picker)")];
|
||||||
const next = group.nextElementSibling;
|
pricing.addEventListener("change", (event) => {
|
||||||
if (next && next.matches("fieldset.price-group")) {
|
const el = event.target;
|
||||||
next.hidden = false;
|
if (!el || !el.matches) return;
|
||||||
try { next.scrollIntoView({ behavior: "smooth", block: "nearest" }); } catch {}
|
if (el.matches("[data-model-pick]")) {
|
||||||
}
|
const model = el.dataset.modelPick;
|
||||||
});
|
sets.forEach((s) => s.classList.toggle("active", s.dataset.modelSet === model));
|
||||||
|
pricing.querySelectorAll("[data-price]").forEach((r) => { r.checked = false; });
|
||||||
|
groups.forEach((g) => { g.hidden = true; });
|
||||||
|
if (groups[0]) {
|
||||||
|
groups[0].hidden = false;
|
||||||
|
try { groups[0].scrollIntoView({ behavior: "smooth", block: "nearest" }); } catch {}
|
||||||
|
}
|
||||||
|
try { window.umami && window.umami.track("price-model-" + model); } catch {}
|
||||||
|
} else if (el.matches("[data-price]")) {
|
||||||
|
try {
|
||||||
|
window.umami &&
|
||||||
|
window.umami.track(`price-${el.dataset.priceModel}-${el.dataset.priceGroup}-${el.dataset.price}`);
|
||||||
|
} catch {}
|
||||||
|
const group = el.closest("fieldset.price-group");
|
||||||
|
const next = group && group.nextElementSibling;
|
||||||
|
if (next && next.matches("fieldset.price-group")) {
|
||||||
|
next.hidden = false;
|
||||||
|
try { next.scrollIntoView({ behavior: "smooth", block: "nearest" }); } catch {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
})();
|
})();
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@@ -526,6 +564,8 @@ const hasForm = isAudiencePage;
|
|||||||
.price-list { grid-template-columns: repeat(auto-fit, minmax(6.5rem, 1fr)); }
|
.price-list { grid-template-columns: repeat(auto-fit, minmax(6.5rem, 1fr)); }
|
||||||
fieldset.price-group { border: 0; margin: 1.4rem 0 0; padding: 0; }
|
fieldset.price-group { border: 0; margin: 1.4rem 0 0; padding: 0; }
|
||||||
fieldset.price-group[hidden] { display: none; }
|
fieldset.price-group[hidden] { display: none; }
|
||||||
|
.price-group .model-set { display: none; }
|
||||||
|
.price-group .model-set.active { display: grid; }
|
||||||
fieldset.price-group legend {
|
fieldset.price-group legend {
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
font-size: 1rem;
|
font-size: 1rem;
|
||||||
|
|||||||
+31
-53
@@ -25,61 +25,39 @@ value_props_title: What you get
|
|||||||
journey: []
|
journey: []
|
||||||
journey_title: ''
|
journey_title: ''
|
||||||
journey_note: ''
|
journey_note: ''
|
||||||
|
price_model_question: Which pricing model would you prefer?
|
||||||
|
price_models:
|
||||||
|
- key: monthly
|
||||||
|
label: Monthly subscription
|
||||||
|
options:
|
||||||
|
- { key: eur0, label: "€0" }
|
||||||
|
- { key: eur10, label: "€10" }
|
||||||
|
- { key: eur25, label: "€25" }
|
||||||
|
- { key: eur50, label: "€50" }
|
||||||
|
- { key: eur100plus, label: "€100+" }
|
||||||
|
- key: annual
|
||||||
|
label: Annual
|
||||||
|
options:
|
||||||
|
- { key: eur0, label: "€0" }
|
||||||
|
- { key: eur50, label: "€50" }
|
||||||
|
- { key: eur150, label: "€150" }
|
||||||
|
- { key: eur300, label: "€300" }
|
||||||
|
- { key: eur500, label: "€500" }
|
||||||
|
- key: per_project
|
||||||
|
label: Per project
|
||||||
|
options:
|
||||||
|
- { key: eur0, label: "€0" }
|
||||||
|
- { key: eur10, label: "€10" }
|
||||||
|
- { key: eur25, label: "€25" }
|
||||||
|
- { key: eur50, label: "€50" }
|
||||||
|
- { key: eur100plus, label: "€100+" }
|
||||||
price_groups:
|
price_groups:
|
||||||
- key: too_expensive
|
- { key: too_expensive, heading: "At what price would the journey feel too expensive?" }
|
||||||
heading: At what monthly price would the journey feel too expensive?
|
- { key: bargain, heading: "At what price would it be a bargain you'd sign up straight away?" }
|
||||||
options:
|
- { key: too_cheap, heading: "At what price is it so cheap you'd doubt it's any good?" }
|
||||||
- key: eur0
|
- { key: worth_considering, heading: "At what price would it feel expensive, but worth considering?" }
|
||||||
label: €0
|
|
||||||
- key: eur10
|
|
||||||
label: €10
|
|
||||||
- key: eur25
|
|
||||||
label: €25
|
|
||||||
- key: eur50
|
|
||||||
label: €50
|
|
||||||
- key: eur100plus
|
|
||||||
label: €100+
|
|
||||||
- key: bargain
|
|
||||||
heading: At what monthly price would it be a bargain you'd sign up straight away?
|
|
||||||
options:
|
|
||||||
- key: eur0
|
|
||||||
label: €0
|
|
||||||
- key: eur10
|
|
||||||
label: €10
|
|
||||||
- key: eur25
|
|
||||||
label: €25
|
|
||||||
- key: eur50
|
|
||||||
label: €50
|
|
||||||
- key: eur100plus
|
|
||||||
label: €100+
|
|
||||||
- key: too_cheap
|
|
||||||
heading: At what monthly price is it so cheap you'd doubt it's any good?
|
|
||||||
options:
|
|
||||||
- key: eur0
|
|
||||||
label: €0
|
|
||||||
- key: eur10
|
|
||||||
label: €10
|
|
||||||
- key: eur25
|
|
||||||
label: €25
|
|
||||||
- key: eur50
|
|
||||||
label: €50
|
|
||||||
- key: eur100plus
|
|
||||||
label: €100+
|
|
||||||
- key: worth_considering
|
|
||||||
heading: At what monthly price would it feel expensive, but worth considering?
|
|
||||||
options:
|
|
||||||
- key: eur0
|
|
||||||
label: €0
|
|
||||||
- key: eur10
|
|
||||||
label: €10
|
|
||||||
- key: eur25
|
|
||||||
label: €25
|
|
||||||
- key: eur50
|
|
||||||
label: €50
|
|
||||||
- key: eur100plus
|
|
||||||
label: €100+
|
|
||||||
price_title: Help us get it right
|
price_title: Help us get it right
|
||||||
price_note: Four quick questions on the monthly price, one at a time. Your answers are anonymous in our analytics (if you've allowed them) and arrive with your invitation request below.
|
price_note: First tell us which pricing model you'd prefer, then answer four quick questions about price - one at a time. Anonymous in our analytics (if you've allowed them), and the answers arrive with your invitation request below.
|
||||||
capabilities:
|
capabilities:
|
||||||
- key: team_collaboration
|
- key: team_collaboration
|
||||||
heading: Team collaboration
|
heading: Team collaboration
|
||||||
|
|||||||
Reference in new issue
Block a user