feat: DataLayer GA4 analytics fix — poprawka eventów ecommerce
Naprawione eventy purchase, begin_checkout, view_item, add_to_cart do formatu GA4 (item_id/item_name zamiast id/name, currency PLN, google_business_vertical, poprawne typy danych). Dodany nowy event view_cart na stronie koszyka. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -4,6 +4,15 @@ Logi zmian z migracji na Domain-Driven Architecture. Najnowsze na gorze.
|
||||
|
||||
---
|
||||
|
||||
## ver. 0.345 (2026-03-25) - DataLayer GA4 analytics fix
|
||||
|
||||
- **FIX**: `templates/shop-order/order-details.php` — event purchase: id→item_id (string), name→item_name, price via normalize_decimal (fix price:0), usunięty hardcoded value: 25.42, dodany google_business_vertical
|
||||
- **FIX**: `templates/shop-basket/summary-view.php` — event begin_checkout: id→item_id, name→item_name, dodany google_business_vertical
|
||||
- **FIX**: `templates/shop-product/product.php` — event view_item: dodany currency PLN, value, price jako number (nie string), google_business_vertical; event add_to_cart: dodany google_business_vertical, parseInt(quantity)
|
||||
- **NEW**: `templates/shop-basket/basket.php` — nowy event view_cart na stronie koszyka z pełnym zestawem danych GA4 (item_id, item_name, price, quantity, currency, google_business_vertical)
|
||||
|
||||
---
|
||||
|
||||
## ver. 0.344 (2026-03-19) - Edycja personalizacji produktu w koszyku
|
||||
|
||||
- **NEW**: `autoload/front/Controllers/ShopBasketController.php` — nowa metoda `basketUpdateCustomFields()`: AJAX endpoint do edycji custom fields w koszyku z walidacją required, przeliczaniem product_code (MD5 hash) i merge duplikatów
|
||||
|
||||
@@ -107,4 +107,6 @@ Dodać możliwość ustawienia limitu znaków w wiadomościach do produktu
|
||||
|
||||
## SonarQube — 0.344 (2026-03-19)
|
||||
|
||||
- [ ] [MINOR] autoload/front/Controllers/ShopBasketController.php:484 — Use empty() to check whether the array is empty (php:S1155)
|
||||
- [ ] [MINOR] autoload/front/Controllers/ShopBasketController.php:484 — Use empty() to check whether the array is empty (php:S1155)
|
||||
|
||||
## SonarQube — 0.345 (2026-03-25) — brak nowych issues
|
||||
Reference in New Issue
Block a user