templates/layout/includes/js.html.twig line 1

Open in your IDE?
  1. {% do jsConfig().add({
  2.     'lang': app.request.locale,
  3.     'admin': editmode ? true : false,
  4.     'googleMapAPIKey': googleApiKey(),
  5. }) %}
  6. {% do jsConfig('_translations').add({
  7.     'alert-notification.generic-error': 'Oops. Something went wrong. Please try again.',
  8.     'alert-notification.close': 'Close'
  9. }) %}
  10. {% set host = app.request.getHost() %}
  11. {% set path = app.request.pathinfo %}
  12. {# Check if domain is exactly www.kuhn.at #}
  13. {% if host == 'www.kuhn.at' or host == 'kuhn.at' %}
  14.     {# Match only specific paths #}
  15.     {% if path matches '#^/en/cranes-handling-systems/(cranes|forklifts|industries|services)(/|$)#' or
  16.             path matches '#^/de/ladetechnik/(krane|staple|branchen|services)(/|$)#' %}
  17.         <script defer="true">
  18.             (function(w,d,s,l,i){
  19.                 var g=w[l] ? '&s='+w[l]:'', f=d.getElementsByTagName(s)[0], j=d.createElement(s);
  20.                 j.async=true,j.src='https://dntfctn.com/stm.js?id='+i+g;
  21.                 j.referrerPolicy='no-referrer-when-downgrade';
  22.                 f.parentNode.insertBefore(j,f);
  23.             })(window,document,'script','name','F5H4h6m7P1H8')
  24.         </script>
  25.     {% endif %}
  26. {% endif %}