templates/gtm.html.twig line 1

Open in your IDE?
  1. {% if app.environment is same as('prod') and currentHotel.isGoogleTagConfigured() %}
  2.     <!-- Global site tag (gtag.js) - Google Analytics -->
  3.     <script async src="https://www.googletagmanager.com/gtag/js?id={{ currentHotel.googleTagMeasurementId }}"></script>
  4.     <script>
  5.         window.dataLayer = window.dataLayer || [];
  6.         function gtag(){dataLayer.push(arguments);}
  7.         gtag('js', new Date());
  8.         gtag('config', '{{ currentHotel.googleTagMeasurementId }}');
  9.     </script>
  10. {% endif %}