diff --git a/src/CoreShop/Bundle/TrackingBundle/Resolver/ConfigResolver.php b/src/CoreShop/Bundle/TrackingBundle/Resolver/ConfigResolver.php index 3850c7b1f4..ac588c15ae 100644 --- a/src/CoreShop/Bundle/TrackingBundle/Resolver/ConfigResolver.php +++ b/src/CoreShop/Bundle/TrackingBundle/Resolver/ConfigResolver.php @@ -28,7 +28,7 @@ public function __construct(private SiteIdProvider $siteIdProvider, private Goog public function getGoogleConfig(): ?ConfigObject { - if (null !== $this->googleConfig) { + if (isset($this->googleConfig)) { return $this->googleConfig; } diff --git a/src/CoreShop/Bundle/TrackingBundle/Tracker/Google/GlobalSiteTagEnhancedEcommerce.php b/src/CoreShop/Bundle/TrackingBundle/Tracker/Google/GlobalSiteTagEnhancedEcommerce.php index cb0784a0f2..a20f79af75 100644 --- a/src/CoreShop/Bundle/TrackingBundle/Tracker/Google/GlobalSiteTagEnhancedEcommerce.php +++ b/src/CoreShop/Bundle/TrackingBundle/Tracker/Google/GlobalSiteTagEnhancedEcommerce.php @@ -185,11 +185,11 @@ protected function transformProductAction(array $item): array 'id' => $item['id'], 'name' => $item['name'], 'category' => $item['category'], - 'brand' => $item['brand'], - 'variant' => $item['variant'], + 'brand' => $item['brand'] ?? null, + 'variant' => $item['variant'] ?? null, 'price' => round($item['price'], 2), - 'quantity' => $item['quantity'] ?: 1, - 'position' => $item['position'], + 'quantity' => $item['quantity'] ?? 1, + 'position' => $item['position'] ?? null, 'currency' => $item['currency'], ]); }