Stay organized with collections
Save and categorize content based on your preferences.
Overview
Ensures that ad tag library scripts are being requested securely. This not only
provides better security for your users, it also improves performance. Since ad
requests issued by GPT always use HTTPS, loading the library itself from the
recommended host via HTTPS ensures that the
browser only needs to open 1 connection for all requests related to ad serving.
Recommendations
Always load your ad tag scripts from an HTTPS URL.
Incorrect
<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>
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-06-26 UTC."],[[["Loading ad tag library scripts securely over HTTPS enhances security and performance for users."],["Browsers establish a single connection for ad serving when GPT and its library are fetched via HTTPS."],["Ad tag scripts should always be loaded from an HTTPS URL for optimal security."],["Google Publisher Tag and AdSense are among the supported ad tag library scripts, and their HTTPS URLs are provided for reference."]]],[]]