ย้ายข้อมูลไปยัง Google Tag Manager
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
หากต้องการใช้ประโยชน์สูงสุดจาก Google Tag Manager คุณควรย้ายข้อมูลแท็กทั้งหมด (หรือมากที่สุด) ไปยัง Tag Manager ขั้นตอนที่แนะนํามีดังนี้
แมปเว็บไซต์ (ไม่บังคับ)
ลองนึกถึงแท็กที่คุณอาจนําไปใช้ในเว็บไซต์อยู่ในตอนนี้ ลองนึกถึงการดําเนินการ (เหตุการณ์) ที่คุณต้องการติดตามและข้อมูล (ตัวแปร) ที่คุณต้องการรวบรวม สร้างแผนที่ของแท็ก ข้อมูลที่จะรวบรวม และเหตุการณ์หรือหน้าเว็บที่คุณต้องการเชื่อมโยงกับแท็กเหล่านั้น
ติดตั้งโค้ด Tag Manager ในเว็บไซต์ของคุณ
เมื่อแมปเว็บไซต์แล้ว ให้ติดตั้งแท็กคอนเทนเนอร์ Tag Manager ในเว็บไซต์แล้วทําให้ใช้งานได้ อ่านข้อมูลเพิ่มเติมได้ที่หลักเกณฑ์การติดตั้ง
เพิ่มเหตุการณ์และตัวแปร
ปรับแต่งการติดตั้ง Google Tag Manager โดยใช้วิธีการที่ระบุไว้ในคําแนะนําเหตุการณ์
กําหนดค่าแท็กและทริกเกอร์ที่เกี่ยวข้องใน Tag Manager
เมื่อติดตั้ง Tag Manager ในเว็บไซต์แล้ว คุณควรเพิ่มแท็กเว็บไซต์ลงในอินเทอร์เฟซผู้ใช้ อย่าเผยแพร่ในขณะนี้ เพียงเพิ่มและกําหนดค่าแท็กจากเว็บไซต์ใน Tag Manager ด้วยเทมเพลตและทริกเกอร์แท็กที่เหมาะสม ดูข้อมูลเพิ่มเติมเกี่ยวกับทริกเกอร์
การสลับการย้ายข้อมูลครั้งสุดท้าย
ขั้นตอนสุดท้ายคือการแลกเปลี่ยนแท็กเก่าและเผยแพร่แท็กใน Google Tag Manager พร้อมกัน ไม่กี่นาทีภายในไม่กี่นาที ก็จะต้องทําดังนี้
- นําแท็กเว็บไซต์ออกในการพุชโค้ดครั้งเดียว
- เมื่อทราบแล้วว่าพุชสําเร็จแล้ว ให้กดปุ่ม "เผยแพร่" สําหรับเวอร์ชันคอนเทนเนอร์
วิธีการนี้อาจทําให้เกิดช่องว่างข้อมูลเล็กน้อย แต่เมื่อการสลับครั้งแรกเสร็จสมบูรณ์
จะไม่มีช่องว่างอีกต่อไป อีกทางเลือกหนึ่งคือ เปลี่ยนคําสั่งซื้อที่นี่และเผยแพร่ในไม่ช้าก่อนที่การเปลี่ยนแปลงเว็บไซต์จะเผยแพร่ การดําเนินการนี้อาจทําให้เกิดข้อมูลซ้ําเล็กน้อยในช่องว่างแทนข้อมูลขนาดเล็ก
หลังจากที่ย้ายข้อมูลครั้งแรกไปยัง Tag Manager เรียบร้อยแล้ว คุณจะจัดการการกําหนดค่าแท็กที่ตามมาได้โดยไม่ต้องเปลี่ยนโค้ดผ่านอินเทอร์เฟซ Tag Manager
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2024-07-29 UTC
[null,null,["อัปเดตล่าสุด 2024-07-29 UTC"],[[["\u003cp\u003eMigrate all existing website tags to Google Tag Manager for centralized management.\u003c/p\u003e\n"],["\u003cp\u003eMap your website's tags, data, and events for a smooth transition.\u003c/p\u003e\n"],["\u003cp\u003eInstall Tag Manager code, add events and variables, and configure tags within the interface.\u003c/p\u003e\n"],["\u003cp\u003eSwap out old tags with the new Tag Manager setup to complete the migration.\u003c/p\u003e\n"],["\u003cp\u003eManage future tag configurations without code changes through the Tag Manager interface.\u003c/p\u003e\n"]]],["To utilize Google Tag Manager, migrate existing tags by mapping your site's tags, data, and events. Install the Tag Manager code, then customize it with events and variables. Configure tags and triggers within Tag Manager's interface. Lastly, simultaneously remove old site tags and publish the configured tags in Tag Manager, which you can do in a few minutes. After migration, future tag adjustments occur through Tag Manager's interface without code changes.\n"],null,["# Migrate to Google Tag Manager\n\nTo gain the most value from Google Tag Manager, you should migrate all (or as\nmany as possible) of your existing tags into Tag Manager. The recommended steps\nare as follows:\n\n1. **Map your site (optional)**\n\n Think about which tags you might currently have deployed on your site. Think\n about what actions (events) you want to track and what data (variables)\n you'll want to collect. Create a map of tags, the data to be collected, and\n which events or pages you want to associate with those tags.\n2. **Install the Tag Manager code on your site**\n\n Once you've mapped your site, install the Tag Manager container tag on your\n site and deploy it. Read the [installation guidance](https://support.google.com/tagmanager/answer/14842164) for more information.\n3. **Add Events and Variables**\n\n Customize your Google Tag Manager installation using the methods outlined in\n the [events guidance](/tag-platform/devguides/events).\n4. **Configure tags and their associated triggers in Tag Manager**\n\n Once Tag Manager is installed on your site, you should add your site tags to\n the user interface. DO *NOT* publish at this time. Simply add and configure\n the tags from your site in Tag Manager with appropriate tag templates and\n triggers. [Learn more about triggers](https://support.google.com/tagmanager/topic/7679384).\n5. **Final migration swap**\n\n The last step is where you simultaneously swap out your old tags and publish\n your tags in Google Tag Manager. Within a few minutes of each other, you'll\n want to:\n - Remove your site tags in a single code push\n - Once you know this push is successful, press the \"Publish\" button for your container version.\n\n This method might cause a small gap in data, but once the initial swap is\n complete, no more gaps will appear. Alternatively, you could swap the order\n here and publish shortly before your site changes go live. This might cause\n minor, one-time data duplication instead of a small data gap.\n\nAfter you've completed the initial migration to Tag Manager, any subsequent tag\nconfiguration needs can be handled without code changes via the Tag Manager\ninterface."]]