diff --git a/assets/tools/UtmEvent.js b/assets/tools/UtmEvent.js index ef368e9..06b38a1 100644 --- a/assets/tools/UtmEvent.js +++ b/assets/tools/UtmEvent.js @@ -104,18 +104,3 @@ export class UtmEvent extends HTMLElement { } } } - -// Chargement automatique d'Umami si consentement -export function loadUmamiScript() { - if (sessionStorage.getItem('ldk_cookie') === 'accepted') { - if (!document.querySelector('script[data-website-id="38d713c3-3923-4791-875a-dfe5f45372c3"]')) { - const script = document.createElement('script'); - script.defer = true; - script.src = "https://tools-security.esy-web.dev/script.js"; - const umamiScript = document.querySelector('script[data-website-id]'); - const websiteId = umamiScript ? umamiScript.getAttribute('data-website-id') : null; - script.setAttribute('data-website-id', websiteId); - document.head.appendChild(script); - } - } -} diff --git a/src/Controller/Dashboard/HomeController.php b/src/Controller/Dashboard/HomeController.php index fe0cafb..b1305f2 100644 --- a/src/Controller/Dashboard/HomeController.php +++ b/src/Controller/Dashboard/HomeController.php @@ -81,7 +81,6 @@ class HomeController extends AbstractController } }); - $this->cache->delete('umami_stats_24h'); // 2. Récupération des Stats (Cache 15min) return $this->cache->get('umami_stats_24h', function (ItemInterface $item) use ($token) { $item->expiresAfter(900); @@ -110,6 +109,7 @@ class HomeController extends AbstractController 'type' => 'referrer' ], ]); + dd($metricsResponse->getContent()); $referrers = $metricsResponse->toArray(); dd($referrers); // 3. Process Sources @@ -146,6 +146,7 @@ class HomeController extends AbstractController 'sources' => $sources ]; } catch (\Exception $e) { + dd($e); return [ 'visitors' => 0, 'views' => 0, diff --git a/templates/revervation/base.twig b/templates/revervation/base.twig index 53ed81c..733fdd4 100644 --- a/templates/revervation/base.twig +++ b/templates/revervation/base.twig @@ -6,7 +6,7 @@ {# --- SEO Fondamental --- #} - {% block title %}{{ 'base.seo.title'|trans }}{% endblock %} + {% block title %}{{ 'Location Structure Gonflable & Châteaux pour vos Événements | Ludikevent'|trans }}{% endblock %} {% if block('description') is defined %} @@ -17,7 +17,7 @@ {% endblock %} - + {# --- Open Graph --- #} @@ -27,6 +27,7 @@ {% endif %} + {# --- Twitter Card --- #} @@ -35,14 +36,49 @@ {% block extra_header %}{% endblock %} - {# ... scripts PWA / Analytics ... #} + {# --- Données Structurées (JSON-LD) --- #} + + {% block jsonld %}{% endblock %} + {# --- PWA & Analytics --- #} + {% if app.environment != 'dev' %} + {{ pwa(swAttributes={ 'nonce': csp_nonce('script') }) }} + + {% else %} + + {% endif %} + + {{ vite_asset('reserve.js',{}) }} {% block stylesheets %}{% endblock %} - - - -