بوابة علامات التتبّع من Google للمعلِنين: تحميل نصوص Google البرمجية من الطرف الأول
تنظيم صفحاتك في مجموعات
يمكنك حفظ المحتوى وتصنيفه حسب إعداداتك المفضّلة.
هذا المستند مخصّص للمطوّرين الذين يستخدمون وضع علامات التتبُّع من جانب الخادم ويريدون عرض نصوص برمجية من Google في سياق الطرف الأول.
تتيح لك "بوابة علامات التتبّع من Google للمعلِنين" تحميل نصوص Google البرمجية، مثل gtm.js، مباشرةً من البنية الأساسية الخاصة بالطرف الأول بدلاً من خوادم Google.
يتيح لك ذلك عرض البيانات في سياق الطرف الأول إما من خلال خادم وضع العلامات أو من خلال شبكة توصيل المحتوى (CDN).
تاريخ التعديل الأخير: 2025-07-29 (حسب التوقيت العالمي المتفَّق عليه)
[null,null,["تاريخ التعديل الأخير: 2025-07-29 (حسب التوقيت العالمي المتفَّق عليه)"],[[["\u003cp\u003eThis article guides developers on serving Google scripts like gtm.js or gtag.js from their own servers using server-side tagging for a first-party data context.\u003c/p\u003e\n"],["\u003cp\u003eBefore starting, ensure you have a server container in Tag Manager, a tagging server setup, and a configured custom server domain.\u003c/p\u003e\n"],["\u003cp\u003eImplementation involves configuring the client to load Google scripts through your server, updating the script source domain to your server, and verifying the script source using browser developer tools.\u003c/p\u003e\n"],["\u003cp\u003eIf using consent mode, you can further enhance control by setting up region-specific tag behavior after completing the implementation.\u003c/p\u003e\n"]]],["Developers using server-side tagging can load Google scripts (gtm.js, gtag.js) from their own server for a first-party context. This requires setting up a server container, a tagging server, and a custom server domain. Steps involve configuring the client to load scripts through the server and updating the script source URL on the website to point to the custom server. Verification includes checking the browser's developer tools to confirm that `gtm.js` loads from the custom server, not Google's.\n"],null,["# Google tag gateway for advertisers: Load Google scripts first-party\n\n\u003e This document is for developers who use server-side tagging and want to serve\n\u003e Google scripts in a first-party context.\n\nGoogle tag gateway for advertisers lets you load Google scripts, such as gtm.js,\ndirectly from your first-party infrastructure instead of from Google's servers.\nThis lets you serve data within a first-party context either through your\ntagging server or through a CDN.\n\nBefore you begin\n----------------\n\nThis guide assumes that you have done the following:\n\n- [Set up a server container in Tag Manager](/tag-platform/tag-manager/server-side/overview#create_a_tag_manager_server_container)\n- [Set up a tagging server](/tag-platform/tag-manager/server-side/overview#set_up_a_tagging_server)\n- [Configured a custom server domain](/tag-platform/tag-manager/server-side/custom-domain?option=same-origin)\n\nTo get started, pick how you want to serve your Google scripts.\n\nCDN (recommended) Tagging server\nPick an implementation option to see instructions.\n\nNext steps\n----------\n\nIf you are using consent mode, you can set up [region-specific tag behavior](/tag-platform/tag-manager/server-side/enable-region-specific-settings) for even\nmore control."]]