feat(02-purchase-event-prepayment): move purchase event to przelewy24 pre-payment page

Phase 2 complete:
- buildPurchaseDataLayer() called in przelewy24() controller, payload passed to template
- dataLayer.push added to templates/tickets/przelewy24.php (fires at order commitment)
- dataLayer.push removed from templates/tickets/order-confirm.php
- Captures 100% of orders regardless of user returning from payment gateway

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-26 22:29:54 +02:00
parent 5bbec72b59
commit 86e712ba4f
9 changed files with 404 additions and 54 deletions

View File

@@ -1,30 +1,30 @@
# Project State
# Project State
## Project Reference
See: .paul/PROJECT.md (updated 2026-04-19)
**Core value:** Uzytkownicy moga szybko i bezpiecznie kupic bilety online oraz otrzymac natychmiastowe potwierdzenie zakupu.
**Current focus:** v0.1 Initial Release complete - ready for next milestone planning
**Current focus:** v0.2 Analytics & Privacy — Phase 2 (Purchase Event Pre-Payment) planning
## Current Position
Milestone: v0.1 Initial Release
Phase: 1 of 1 (Purchase Data Layer) - Complete
Plan: 01-01 complete
Status: Loop closed, ready for next PLAN
Last activity: 2026-04-19 20:31 - Completed UNIFY and phase transition for 01-01
Milestone: v0.2 Analytics & Privacy
Phase: 2 of 3 (Purchase Event Pre-Payment) — Planning
Plan: 02-01 executed
Status: APPLY complete, ready for UNIFY
Last activity: 2026-04-26 — Executed 02-01-PLAN.md (2 tasks, 3 files modified)
Progress:
- Milestone: [##########] 100%
- Phase 1: [##########] 100%
- Milestone: [░░░░░░░░░░] 0%
- Phase 2: [░░░░░░░░░░] 0%
## Loop Position
Current loop state:
```
PLAN --> APPLY --> UNIFY
x x x [Loop complete - ready for next PLAN]
[APPLY complete, awaiting UNIFY]
```
## Accumulated Context
@@ -33,12 +33,20 @@ PLAN --> APPLY --> UNIFY
Date: 2026-04-26
Documents: `.paul/codebase/` (8 files — stack, architecture, structure, conventions, testing, integrations, concerns, db_schema)
### GTM Status
- GTM-TW9WCD9J już wdrożony w templates/site/layout-logged.php (i layout-unlogged.php)
- layout-unlogged.php NIE jest renderowany — view/class.Site.php zawsze używa layout-logged.php
### Decisions
- 2026-04-19: Event `purchase` emitowany na `order-confirm`, nie na `przelewy24` (eliminuje falszywe konwersje).
- 2026-04-19: Payload ecommerce budowany w backendzie i serializowany bezpiecznie do widoku.
- 2026-04-26: ZMIANA DECYZJI — event purchase przenoszony na `przelewy24` (post-order, pre-payment) aby capturować użytkowników którzy nie wracają po płatności.
### Cookie Consent Bug
- cookienoticepro.script.js ~linia 351: gdy analytics NIE zaakceptowane, kod wywołuje gtag('consent','update',{'analytics_storage':'granted'}) zamiast 'denied'
### Deferred Issues
None yet.
- Phase 3: Cookie Consent Banner (zaplanowane po Phase 2)
### Blockers/Concerns
None yet.
@@ -50,10 +58,10 @@ Feature branches merged: none
## Session Continuity
Last session: 2026-04-19 20:32
Stopped at: Phase 1 complete and unified
Next action: Start next milestone planning ($paul-milestone or $paul-plan after roadmap update)
Resume file: .paul/ROADMAP.md
Last session: 2026-04-26
Stopped at: Plan 02-01 created
Next action: Review and approve plan, then run /paul:apply .paul/phases/02-purchase-event-prepayment/02-01-PLAN.md
Resume file: .paul/phases/02-purchase-event-prepayment/02-01-PLAN.md
---
*STATE.md - Updated after every significant action*