All lanes
Detect
Select
Activate
Display
Measure
Click any node for its detailed plan. See the skill at skills/ep043/ep043-website-tracking/SKILL.md for the full implementation reference.
Lane 1 — Detect opportunity
Actor: tracking system · day-over-day comparison triggers the notification
Comparison Day-over-day comparison GET /api/owner/reporting/compare?tenant=<id>&days=7 returns today's data vs the daily average for the previous 7 days. Services with significantly above-average traffic are flagged.
detect (1.1)Complete — GET /api/owner/reporting/compare, tested
→
Notification Service popularity alert Owner dashboard shows: "Boiler servicing is up 50% in views this week" with a "Respond with promotion" button. The notification highlights the service name, the metric, and the percentage increase.
detect (1.2)Complete — demand-signals card in owner.js Compare tab
→
Decision Owner decides to respond Owner clicks "Respond with promotion" and enters the promotion creation flow. If they decline or dismiss, the alert is recorded but no action is taken — the alert may re-appear later.
detect (1.3)Designing
Lane 2 — Select offer type
Actor: business owner · chooses promotion type and configures parameters
Selection list Offer type selection Owner sees a selection list of promotion types: (A) Time-limited promotional discount (X%), (B) Time-limited voucher (X%), (C) Time-limited service combo at discount (X%), (D) Other promotional description. Each option has a brief explanation.
select (2.1)Complete — promo-type select (discount/voucher/combo/custom)
→
Configure Configure promotion parameters Owner sets: discount/voucher value (X%), service target (single/multiple/any), duration in hours/days, voucher code (if applicable), promotional description text. Preview shown before submission.
select (2.2)Complete — promo-form: value, duration, voucher code
→
Target Service targeting Owner selects which service(s) the promotion applies to: (1) single specific service, (2) multiple services, (3) any service. Each targeting mode shows relevant service names from the client profile.
select (2.3)Complete — promo-services multi-select, applyTo derived
→
POST /api/owner/promotions Submit and store promotion Owner submits. POST /api/owner/promotions with promotion payload (type, value, description, services, duration, displayOn). Server stores and activates. Returns promotionId and activation timestamp.
select (2.4)Complete — POST /api/owner/promotions, tested
Lane 3 — Activation and display
Actor: system · promotion becomes visible on website and/or chat widget
Activate System activates promotion The promotion is stored with active: true, startAt and endAt timestamps. The promotion engine checks endAt on every display tick — expired promotions are automatically deactivated.
activate (3.1)Complete — active/startAt/endAt, status computed server-side
→
Website Promotion banner on website A dismissible notification bar is injected at the top of the client's website. Shows promotion description text. On click: navigates to the promoted service page / quote form. Respects site theme (accent color).
activate (3.2)Complete — renderBanner() in analytics-embed.js, verified in real browser
→
Chat widget Promotional message in chat widget When the chat widget opens, the assistant starts with a promotional greeting: "Get X% off [service] quotes this week!". The promotion links to the service page or quote form. Owner can toggle per display channel.
activate (3.3)Not yet implemented
→
Capture Promotion events captured Every impression (banner in viewport) and click is captured as a promotion event with promotionId, timestamp, pageUrl, sessionId. Stored in the event bucket for effectiveness analysis.
activate (3.4)Complete — promotion_impression/click in ALLOWED_EVENT_TYPES
Lane 4 — Owner management
Actor: business owner · manage, pause, expire promotions
GET /api/owner/promotions List all promotions Owner views all active and past promotions. Shows: service, type, value, status (active/expired/paused), impression/click counts, timestamps.
manage (4.1)Complete — GET /api/owner/promotions + Promotions tab UI
→
PUT /api/owner/promotions/:id/deactivate Pause or expire early Owner can deactivate a promotion before its endAt time. The banner/chat message is removed immediately. The effectiveness comparison is still captured for the active period.
manage (4.2)Complete — PUT /api/owner/promotions/:id/deactivate
→
PUT /api/owner/promotions/:id/activate Renew or extend promotion Owner can extend the endAt time or reactivate an expired promotion. A new startAt/endAt is set. Effectiveness tracking is cumulative or per-run (owner chooses).
manage (4.3)Complete — PUT /api/owner/promotions/:id/activate
Lane 5 — Effectiveness measurement
Actor: tracking system · measures impact before, during, and after promotion
Baseline Pre-promotion baseline For the promoted service(s), the system records: daily views, daily conversions, conversion rate, average time-to-conversion for the 7 days before promotion start.
measure (5.1)Complete — GET /api/owner/reporting/promotion/:id
→
During During-promotion tracking System continuously captures: promotion impressions count, clicks, click-through rate, plus views and conversions for the promoted service(s). All events tagged with promotionId.
measure (5.2)Complete — impressions/clicks/CTR tracked during period
→
After Post-promotion effect After the promotion ends, the system continues tracking for X days to measure lasting effects: boosted conversion rate, returning visitor rate, sustained interest.
measure (5.3)Complete — postPromotion.lastEffect classification
→
GET /api/owner/reporting/promotion/:id Compare and report Owner sees a full effectiveness report: baseline vs during vs post-promotion comparison. Metrics: impression-to-click rate, conversion uplift, revenue impact (if averageJobValue configured).
measure (5.4)Complete — baseline/during/post + revenueImpact, tested
Promotion data shape
{
"promotionId": "uuid",
"clientId": "northstar-heating",
"type": "discount | voucher | combo | custom",
"value": 15,
"valueLabel": "15%",
"description": "15% discount on boiler servicing quotes",
"voucherCode": "BOILER15",
"services": ["boiler-servicing"],
"applyTo": "single | multiple | any",
"startAt": "2026-08-08T12:00:00Z",
"endAt": "2026-08-15T12:00:00Z",
"active": true,
"displayOn": ["website", "chat_widget"],
"createdAt": "2026-08-08T11:30:00Z",
"stats": {
"impressions": 240,
"clicks": 36,
"clickThroughRate": 0.15,
"conversions": 12,
"conversionUplift": "+67%"
}
}
Effectiveness comparison shape
{
"promotionId": "uuid",
"service": "boiler-servicing",
"baseline": {
"dailyViews": 8,
"dailyConversions": 1.2,
"conversionRate": 0.15
},
"duringPromotion": {
"dailyViews": 18,
"dailyConversions": 4.5,
"conversionRate": 0.25,
"impressions": 240,
"clicks": 36,
"clickThroughRate": 0.15
},
"postPromotion": {
"dailyViews": 10,
"dailyConversions": 2.0,
"conversionRate": 0.20,
"lastingEffect": "elevated — +67% vs baseline"
}
}
Tracking data must be captured at the lowest level. Every visitor interaction — page load, button click, chat open, form focus, service view, scroll milestone, exit intent, booking click — generates an event. This ensures that when the owner asks "how did this promotion affect user behaviour?", the data exists to answer it without a new instrumentation cycle.
Day-over-day overlay is the primary comparison method. Current day data is displayed alongside the daily average for the previous X days (default 7) for every metric. This lets the owner see at a glance whether today's behaviour is in line with the weekly average, above it, or below it — without manually comparing numbers.