| Duration | ~50 min in the lesson + ~30 min homework |
| Prerequisites | Checkpoint lesson-6.9; a rough figure for what one customer is worth to the business |
| Checkpoint | none (the work is committed, but no tag is set) |
What you will have
The student has docs/ads-plan.md stating a test budget, a target cost per lead and a stop rule, backed by a calculator page in the admin area filled with their own figures.
Video
The video for this lesson is not recorded yet.
Prompts used in this lesson
Part 7 — Demonstration: the calculator page
Purpose: I am about to start paid advertising and need a calculator in the admin area to work out what I can afford to pay for a lead. Context: This is the brightside-site project. The admin area lives under /admin and is protected by the existing login. Follow the page and component patterns already used by /admin/today, and the styles in docs/design.md. Build a page at /admin/ads-calculator with these inputs: - gross profit per customer - share of that profit I am willing to spend to win a customer (percent) - share of leads that become customers (percent) - share of visitors that become leads (percent) - test budget per platform and these outputs, updating as I type: - maximum cost per customer - target cost per lead - affordable cost per click - number of leads and clicks the test budget buys at those targets - return on ad spend at the target, given an optional "revenue per customer" input. Show the formula under each output in plain words. Add a link to the page in the admin navigation. Constraints: no database changes; keep the values in the browser's local storage so they survive a reload. All inputs start empty - do not pre-fill example numbers. Handle empty and zero inputs without errors. The page must not be reachable without logging in. Done when: the build passes, you have loaded the page while logged in, entered a set of values and confirmed each output by hand calculation, and confirmed that the page redirects to the login when logged out. Report what you checked.
Part 8 — Demonstration: writing the plan
Purpose: write docs/ads-plan.md, the plan I will follow before and during my first ad campaigns. Context: read docs/brief.md for the business and docs/measurement-plan.md for how leads are measured. My figures from the calculator are: [paste your five inputs and the outputs]. My decisions: test budget of [amount] per platform over [number] days on Google Search and on Meta; stop rules: [your sentences]. The document must contain: the figures and where each came from (measured or estimated); target cost per lead; affordable cost per click; test budget per platform and the daily amount it implies; the stop rules, word for word; a short list of what I will check and on which days; and a line stating that estimated figures will be replaced with measured ones after the first week. Constraints: one page. Use only the numbers I gave you - do not add benchmarks, industry averages or forecasts. If something needed is missing, ask me. Done when: the file exists, every number in it traces to my input, and you have re-checked the arithmetic.
Do along
Pause the video where told and do each step on your own project.
- Start from
lesson-6.9. After Part 7, pause: run the calculator prompt unchanged. - Work out your own customer value. If you have no history, write down your assumption and mark it "estimate".
- Take your close rate from the CRM pipeline (won leads divided by all leads that reached a final stage). With too few leads, estimate and mark it.
- Enter your figures in
/admin/ads-calculator. Change the conversion rate up and down and watch how the affordable click moves. - Decide your test budget per platform and write two stop rules in full sentences with amounts.
- After Part 8, pause: run the plan prompt with your figures in the brackets.
- Commit:
git add -A, thengit commit -m "Lesson 7.1: ads calculator and ads plan", thengit push.
Check your work
- Open
/admin/ads-calculatorlogged in: outputs update as you type. Logged out: you are sent to the login. - Check one output by hand: target cost per lead equals maximum cost per customer multiplied by your close rate.
- Open
docs/ads-plan.mdand find three things: a test budget as an amount, a target cost per lead as an amount, and at least one stop rule that names a trigger and an action. If any is missing or vague ("stop if results are poor"), rewrite it.
Common problems
- Outputs show "NaN" or "Infinity" → an empty or zero input is being divided. Tell Claude: "Outputs must show a dash when an input is empty or zero; fix and test with empty fields."
- The affordable click looks impossibly low → usually a percent entered as a fraction (0.05 instead of 5) or the reverse. Ask Claude to label each field with its unit and an example of the format.
- The plan contains numbers you never supplied → Claude filled gaps. Tell it: "Remove every figure I did not give you and list what you need from me instead."
Homework
About 30 minutes, on your own, after the lesson. No later lesson depends on it.
- Three scenarios. In the calculator, keep your customer value and change the two rates: a cautious case, your expected case and a hopeful case. Deliverable: a "Scenarios" table in
docs/ads-plan.mdwith the target cost per lead and affordable cost per click for each. Done when: the table has three rows and one sentence says how many leads the test budget buys in the cautious case. - Check one estimate against your records. Go through your last ten real enquiries (messages, calls, invoices) and count how many became customers. Deliverable: that count written beside the close rate in the plan, labelled "from records". Done when: the plan shows both the figure you used and the counted one. With no past enquiries, write "no history yet".
- Stop-rule drill. Apply your stop rules to two imagined days: the campaign has spent twice your target cost per lead and brought one lead; half the budget is gone and leads cost double the target. Deliverable: your action for each, in one sentence, under "Stop-rule drill" in the plan. Done when: each answer follows from the written rules without a new decision. If one does not, tighten that rule's wording.
If a task changed files in the project, commit and push without a tag: git add -A, git commit -m "Homework 7.1", git push.