Я создал простой статический веб-сайт с HTML и SASS, но заголовок раздела теперь загроможден кучей скриптов от Facebook, Google и других сторонних разработчиков.
Я узнал о разграничении проблемпоэтому мне было интересно, лучше ли переместить все в тегах сценариев во внешнюю таблицу сценариев и можно ли безопасно выполнить эту операцию.
Вот код раздела заголовка:
<head>
<title>Vendi casa con Casa Lugano Immobiliare SA!!</title>
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta charset="utf-8" />
<link href="https://fonts.googleapis.com/css?family=Lato:400,400i,700,700i|Raleway:400,400i,700,700i" rel="stylesheet">
<link rel="stylesheet" href="CSS/app.css">
<link rel="stylesheet" type="text/css" href="//cdnjs.cloudflare.com/ajax/libs/cookieconsent2/3.1.0/cookieconsent.min.css" />
<!-- Facebook Pixel Code -->
<script>
!function (f, b, e, v, n, t, s) {
if (f.fbq) return; n = f.fbq = function () {
n.callMethod ?
n.callMethod.apply(n, arguments) : n.queue.push(arguments)
};
if (!f._fbq) f._fbq = n; n.push = n; n.loaded = !0; n.version = '2.0';
n.queue = []; t = b.createElement(e); t.async = !0;
t.src = v; s = b.getElementsByTagName(e)[0];
s.parentNode.insertBefore(t, s)
}(window, document, 'script',
'https://connect.facebook.net/en_US/fbevents.js');
fbq('init', '1769570639983938');
fbq('track', 'PageView');
</script>
<noscript><img height="1" width="1" style="display:none" src="https://www.facebook.com/tr?id=1769570639983938&ev=PageView&noscript=1" /></noscript>
<!-- End Facebook Pixel Code -->
<script src="//cdnjs.cloudflare.com/ajax/libs/cookieconsent2/3.1.0/cookieconsent.min.js"></script>
<script>
window.addEventListener("load", function () {
window.cookieconsent.initialise({
"palette": {
"popup": {
"background": "#343a40"
},
"button": {
"background": "transparent",
"border": "white",
"text": "white"
}
},
"content": {
"message": "Questo sito utilizza i cookies per assicurarsi che tu abbia la migliore esperienza sul nostro sito.",
"dismiss": "Ho capito.",
"link": "Approfondisci",
"href": "https://casalugano.ch/informativa-privacy"
}
})
});
</script>
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-115738638-4"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag() { dataLayer.push(arguments); }
gtag('js', new Date());
gtag('config', 'UA-115738638-4');
</script>
<script type="text/javascript">
(function () {
var head = document.getElementsByTagName("head").item(0);
var script = document.createElement("script");
var src = (document.location.protocol == 'https:'
? 'https://www.formilla.com/scripts/feedback.js'
: 'http://www.formilla.com/scripts/feedback.js');
script.setAttribute("type", "text/javascript");
script.setAttribute("src", src); script.setAttribute("async", true);
var complete = false;
script.onload = script.onreadystatechange = function () {
if (!complete && (!this.readyState
|| this.readyState == 'loaded'
|| this.readyState == 'complete')) {
complete = true;
Formilla.guid = 'csd15aa1-95de-4812-a56c-6e7428ea9dcb';
Formilla.loadWidgets();
}
};
head.appendChild(script);
})();
</script>
</head>
<body>
<script>
fbq('track', 'InitiateCheckout');
</script>
Заранее спасибо!