Định cấu hình Trình quản lý thẻ để sử dụng URL liên quan đến giao thức
Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
Để giúp bảo mật dữ liệu thẻ, thẻ vùng chứa Trình quản lý thẻ của Google sử dụng HTTPS để tải tài nguyên (tức là https://www.googletagmanager.com).
Nếu cần tải vùng chứa Trình quản lý thẻ theo cách tương đối với giao thức, bạn có thể thực hiện việc này bằng cách điều chỉnh giao thức trong mã vùng chứa thành // thay vì https://.
<!-- Google Tag Manager -->
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'//www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','GTM-XXXXXX');</script>
<!-- End Google Tag Manager -->
<!-- Google Tag Manager (noscript) -->
<noscript><iframe src="//www.googletagmanager.com/ns.html?id=GTM-XXXXXX"
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<!-- End Google Tag Manager (noscript) -->
Khi bạn sử dụng URL tương ứng với giao thức, vùng chứa sẽ được tải qua HTTP trên các trang sử dụng http:// và qua HTTPS trên các trang sử dụng https://.
Các phiên bản cũ hơn của mã vùng chứa Trình quản lý thẻ đã sử dụng URL tương đối về giao thức để tải vùng chứa (tức là //www.googletagmanager.com). Các phiên bản cũ hơn liên quan đến giao thức của mã vùng chứa Trình quản lý thẻ sẽ tiếp tục hoạt động.
[[["Dễ hiểu","easyToUnderstand","thumb-up"],["Giúp tôi giải quyết được vấn đề","solvedMyProblem","thumb-up"],["Khác","otherUp","thumb-up"]],[["Thiếu thông tin tôi cần","missingTheInformationINeed","thumb-down"],["Quá phức tạp/quá nhiều bước","tooComplicatedTooManySteps","thumb-down"],["Đã lỗi thời","outOfDate","thumb-down"],["Vấn đề về bản dịch","translationIssue","thumb-down"],["Vấn đề về mẫu/mã","samplesCodeIssue","thumb-down"],["Khác","otherDown","thumb-down"]],["Cập nhật lần gần đây nhất: 2024-11-08 UTC."],[[["Google Tag Manager container tag uses HTTPS by default for enhanced security."],["You can switch to a protocol-relative URL (//) for flexible loading based on the page's protocol (HTTP or HTTPS)."],["Existing protocol-relative implementations of Tag Manager containers will continue to function."],["Ensure custom tags on secure pages are set up with protocol-relative or secure URLs for consistent security."]]],["Google Tag Manager uses HTTPS to load resources for security. Users can opt for protocol-relative loading by changing the container code's protocol to `//` instead of `https://`. This method ensures the container loads via HTTP or HTTPS depending on the page's protocol. Older container codes used protocol-relative URLs and remain functional. Custom tags firing on secure pages should also be protocol-relative or secure. The example codes are provided to implement this.\n"]]