تحميل علامة الإعلان عبر HTTPS

نظرة عامة

يضمن هذا الإجراء أن يتم طلب النصوص البرمجية لمكتبة علامات الإعلانات بشكلٍ آمن. لن يؤدي هذا فقط يوفّر مستوى أمان أفضل للمستخدمين، ويؤدي أيضًا إلى تحسين الأداء. منذ الإعلان التي يتم إصدارها من خلال GPT تستخدم بروتوكول HTTPS دائمًا، ما يؤدي إلى تحميل المكتبة نفسها من المضيف المقترَح عبر HTTPS يضمن يحتاج المتصفّح إلى فتح اتصال واحد فقط لجميع الطلبات ذات الصلة بعرض الإعلانات.

اقتراحات

حمِّل دائمًا النصوص البرمجية لعلامات الإعلان من عنوان URL يستخدم HTTPS.

غير صحيح
<script>
  var el = document.createElement('script');
  // Incorrect: potentially loading the ad tag over HTTP.
  var useSSL = 'https:' == document.location.protocol;
  el.src = (useSSL ? 'https:' : 'http:') + '//securepubads.g.doubleclick.net/tag/js/gpt.js';
  var node = document.getElementsByTagName('script')[0];
  node.parentNode.insertBefore(el, node);
</script>
صحيح
<script async src="https://securepubads.g.doubleclick.net/tag/js/gpt.js"></script>

مزيد من المعلومات

تتوفّر النصوص البرمجية التالية لمكتبات علامات الإعلانات:

المكتبة النصوص
AdSense

pagead2.googlesyndication.com/pagead/js/adsbygoogle.js

pagead2.googlesyndication.com/pagead/show_ads.js

علامة "ناشر Google"

googletagservices.com/tag/js/gpt.js

securepubads.g.doubleclick.net/tag/js/gpt.js

بدء استخدام علامات "ناشر Google"