[null,null,["最后更新时间 (UTC):2024-02-06。"],[[["This article guides developers on hosting server-side tagging in a first-party context for enhanced security and cookie durability."],["Achieving same-origin serving involves configuring your tagging server and website to run on the same domain, which can be done using a subdomain or by forwarding requests to a specific path on your main domain."],["Server-side tagging hosted on the default domain lacks access to crucial server-set cookie benefits, unlike same-origin setups."],["Setting up same-origin serving requires updating DNS entries or configuring a CDN/load balancer, depending on the chosen method."],["Before implementing same-origin serving, ensure you've established a server container in Tag Manager and set up a tagging server."]]],["To leverage server-set cookie benefits, host your tagging server in the same first-party context as your website. Options include using the same origin (e.g., `www.example.com/metrics`) or a subdomain (e.g., `metrics.example.com`). Both allow full cookie access, unlike the default provider-hosted domain. Implementing same-origin requires a CDN/load balancer and potential DNS updates, while subdomains only need DNS adjustments. Pre-setup of a server container and tagging server is required.\n"]]