feat(05-purchase-redirect-hardening): harden purchase redirect tracking
Phase 5 complete: - guard purchase event per transaction in sessionStorage - restore saved consent before GTM and purchase - add centered Przelewy24 countdown redirect
This commit is contained in:
@@ -1,15 +1,19 @@
|
||||
# Roadmap: bilety.brzezovka.pl
|
||||
|
||||
## Overview
|
||||
Projekt obejmuje sprzedaz biletow online, tracking ecommerce oraz zgodnosc cookies/RODO. Ostatnia iteracja to hotfix banera cookies po wykryciu bledu JavaScript w CookieNoticePro.
|
||||
Projekt obejmuje sprzedaz biletow online, tracking ecommerce oraz zgodnosc cookies/RODO. Aktualna iteracja domyka tracking purchase na stronie Przelewy24: jednorazowe odpalenie eventu, poprawne zgody i automatyczne przekierowanie do platnosci.
|
||||
|
||||
## Current Milestone
|
||||
**v0.3 Cookie Notice Hotfix** (v0.3.0)
|
||||
**v0.4 Purchase Redirect Hardening** (v0.4.0)
|
||||
Status: Complete (2026-05-08)
|
||||
Phases: 1 of 1 complete
|
||||
|
||||
## Previous Milestones
|
||||
|
||||
### v0.3 Cookie Notice Hotfix
|
||||
Status: Complete (2026-05-08)
|
||||
Phases: 1 of 1 complete
|
||||
|
||||
### v0.2 Analytics & Privacy
|
||||
Status: Complete (2026-04-26)
|
||||
Phases: 3 of 3 complete
|
||||
@@ -26,6 +30,7 @@ Phases: 1 of 1 complete
|
||||
| 2 | Purchase Event Pre-Payment | 1 | Complete | 2026-04-26 |
|
||||
| 3 | Cookie Consent Banner | 1 | Complete | 2026-04-26 |
|
||||
| 4 | Cookie Notice Bugfix | 1 | Complete | 2026-05-08 |
|
||||
| 5 | Purchase Redirect Hardening | 1 | Complete | 2026-05-08 |
|
||||
|
||||
## Phase Details
|
||||
|
||||
@@ -42,18 +47,7 @@ Phases: 1 of 1 complete
|
||||
### Phase 2: Purchase Event Pre-Payment (Complete)
|
||||
|
||||
**Goal:** Przeniesc event purchase do momentu przekierowania na bramke platnicza po zlozeniu zamowienia, przed platnoscia Przelewy24.
|
||||
**Depends on:** Phase 1 (purchase payload builder already implemented)
|
||||
**Research:** Not needed
|
||||
|
||||
**Context:**
|
||||
- GTM (GTM-TW9WCD9J) jest wdrozony w `templates/site/layout-logged.php`.
|
||||
- Event purchase zostal przeniesiony na strone `przelewy24`.
|
||||
- Strona `przelewy24.php` auto-submits formularz, wiec tracking korzysta z beacon transport.
|
||||
|
||||
**Scope:**
|
||||
- Wywolanie `buildPurchaseDataLayer()` w metodzie `przelewy24()` kontrolera.
|
||||
- Dodanie dataLayer push do `templates/tickets/przelewy24.php`.
|
||||
- Usuniecie purchase push z `templates/tickets/order-confirm.php`.
|
||||
**Depends on:** Phase 1
|
||||
|
||||
**Plans:**
|
||||
- [x] 02-01: Przeniesienie eventu purchase na strone przelewy24 (UNIFY complete)
|
||||
@@ -64,18 +58,6 @@ Phases: 1 of 1 complete
|
||||
|
||||
**Goal:** Wdrozyc baner zgody na cookies (CookieNoticePro) z Google Consent Mode v2 i naprawic blad analityki w bibliotece.
|
||||
**Depends on:** Phase 2
|
||||
**Research:** Not needed
|
||||
|
||||
**Context:**
|
||||
- Biblioteka: `libraries/CookieNoticePro/`.
|
||||
- Consent Mode v2 musi byc przed snippetem GTM w `<head>`.
|
||||
- Tylko `templates/site/layout-logged.php` jest uzywany przez glowne widoki.
|
||||
|
||||
**Scope:**
|
||||
- Pliki CookieNoticePro w `libraries/CookieNoticePro/`.
|
||||
- Naprawa `analytics_storage: denied` przy braku zgody analytics.
|
||||
- Consent Mode v2 default przed GTM w `layout-logged.php`.
|
||||
- Integracja CSS/JS banera + inicjalizacja `cookieNoticePro.init()`.
|
||||
|
||||
**Plans:**
|
||||
- [x] 03-01: Integracja CookieNoticePro + Consent Mode v2 (UNIFY complete)
|
||||
@@ -85,22 +67,33 @@ Phases: 1 of 1 complete
|
||||
### Phase 4: Cookie Notice Bugfix (Complete)
|
||||
|
||||
**Goal:** Naprawic blad JavaScript `Uncaught ReferenceError: injectScripts is not defined` w CookieNoticePro.
|
||||
**Depends on:** Phase 3 (CookieNoticePro already integrated)
|
||||
**Research:** Not needed (root cause is visible in local source)
|
||||
|
||||
**Context:**
|
||||
- `libraries/CookieNoticePro/cookienoticepro.script.js` wywolywal `injectScripts()` w dwoch miejscach.
|
||||
- Funkcja `injectScripts` nie istnieje w tej kopii biblioteki.
|
||||
- Blad wystepowal po kliknieciu akceptacji cookies oraz mogl wystapic przy inicjalizacji z zapisanymi zgodami.
|
||||
|
||||
**Scope:**
|
||||
- Usuniecie wywolan `injectScripts()`.
|
||||
- Zachowanie `cookieNoticePro.init()` w `templates/site/layout-logged.php`.
|
||||
- Zachowanie Google Consent Mode v2 i GTM bez zmian.
|
||||
**Depends on:** Phase 3
|
||||
|
||||
**Plans:**
|
||||
- [x] 04-01: Naprawa undefined `injectScripts` w CookieNoticePro (UNIFY complete)
|
||||
|
||||
---
|
||||
|
||||
### Phase 5: Purchase Redirect Hardening
|
||||
|
||||
**Goal:** Zabezpieczyc `purchase` przed ponownym wywolaniem po odswiezeniu strony Przelewy24 i przywrocic automatyczne przekierowanie do Przelewy24 po 5 sekundach z widocznym odliczaniem.
|
||||
**Depends on:** Phase 2 (purchase pre-payment), Phase 3/4 (CookieNoticePro + Consent Mode)
|
||||
**Research:** Not needed
|
||||
|
||||
**Context:**
|
||||
- `purchase` jest wypychany w `templates/tickets/przelewy24.php`.
|
||||
- Manualny test potwierdzil, ze event uruchamia sie poprawnie po zatrzymaniu auto-submit.
|
||||
- Zapisane zgody cookies musza byc przywrocone przed GTM i przed `purchase`.
|
||||
- Obecny przycisk byl tylko tymczasowy do testu.
|
||||
|
||||
**Scope:**
|
||||
- Client-side guard w `templates/tickets/przelewy24.php` na bazie `sessionStorage` i `transaction_id`.
|
||||
- Komunikat + countdown 5s + automatyczny submit formularza Przelewy24.
|
||||
- Zachowanie restore zgody w `templates/site/layout-logged.php`.
|
||||
|
||||
**Plans:**
|
||||
- [x] 05-01: Jednorazowy purchase + redirect countdown do Przelewy24 (UNIFY complete)
|
||||
|
||||
---
|
||||
*Roadmap created: 2026-04-19*
|
||||
*Last updated: 2026-05-08 - v0.3 Cookie Notice Hotfix complete*
|
||||
*Last updated: 2026-05-08 - v0.4 Purchase Redirect Hardening complete*
|
||||
|
||||
Reference in New Issue
Block a user