โหลดเอเจนต์ Device Identification ผ่านแท็ก Custom HTML ของ GTM เพิ่มการระบุผู้เข้าชม การตรวจจับบอต และ smart signals เข้าสู่แอปพลิเคชัน Google Tag Manager ของคุณภายในไม่กี่นาที
เพิ่ม SDK เข้าสู่โปรเจกต์ของคุณด้วย package manager ที่คุณต้องการ
npm install gtm-templateyarn add gtm-templatepnpm add gtm-templateเริ่มใช้งานได้ด้วยการตั้งค่าขั้นต่ำ
<!-- GTM Custom HTML Tag --><script> (function() { var script = document.createElement('script'); // Public key travels in the s.js query string (?k=...) script.src = 'https://edge.tracio.ai/s.js?k=your-public-key'; script.onload = function() { window.Tracio.load() .then(function(tc) { return tc.get(); }) .then(function(result) { dataLayer.push({ event: 'tracio_loaded', visitorId: result.visitorId }); }); }; document.head.appendChild(script); })();</script>รูปแบบพร้อมใช้งานจริงพร้อมการจัดการข้อผิดพลาด สถานะการโหลด และการกำหนดค่าขั้นสูง
<!-- GTM Custom HTML Tag — production setup --><script> (function() { var script = document.createElement('script'); // Public key travels in the s.js query string (?k=...) script.src = 'https://edge.tracio.ai/s.js?k=your-public-key'; script.async = true; script.onerror = function() { dataLayer.push({ event: 'tracio_error', tracio_error_message: 'Failed to load agent script', }); }; script.onload = function() { window.Tracio.load() .then(function(tc) { return tc.get(); }) .then(function(result) { dataLayer.push({ event: 'tracio_loaded', visitorId: result.visitorId, confidence: result.confidence, verdict: result.verdict, }); }) .catch(function(err) { dataLayer.push({ event: 'tracio_error', tracio_error_message: err.message, }); }); }; document.head.appendChild(script); })();</script>ตัวเลือกทั้งหมดสำหรับการเริ่มต้นและกำหนดค่า SDK
publicKeystringpublic key ของคุณจากแดชบอร์ด — ปลอดภัยที่จะส่งไปกับเบราว์เซอร์endpointstringURL endpoint ที่กำหนดเองสำหรับการติดตั้งแบบกำหนดเส้นทางผ่านพร็อกซี — URL ที่ระบุชัดจะมีผลเหนือ regionregionstringภูมิภาคข้อมูล: us หรือ eutimeoutMsnumberเวลาหมดเวลาของการเรียก getResult() ทั้งหมด เป็นมิลลิวินาทีlinkedIdstringID บัญชีภายในของคุณสำหรับผู้ใช้ที่ล็อกอินอยู่ เพื่อเชื่อมโยงการเข้าชมที่ใช้อุปกรณ์เดียวกันtagstringป้ายกำกับอิสระที่แนบไปกับคำขอระบุตัวตน เช่น checkout หรือ logindebugbooleanบันทึกวงจรชีวิตของสคริปต์และกิจกรรมเครือข่ายลงคอนโซลของเบราว์เซอร์scriptUrlstringแทนที่ URL ของสคริปต์เอเจนต์ทั้งหมด — สำหรับโฮสต์เองหรือใช้ Subresource Integrityเจาะลึกยิ่งขึ้นด้วยเอกสารอ้างอิง API ฉบับเต็ม การกำหนดค่า webhook และคู่มือขั้นสูง
เอกสารอ้างอิง API ฉบับเต็ม คู่มือการผสานรวม และแนวปฏิบัติที่ดีที่สุด
การส่งอีเวนต์แบบเรียลไทม์ สคีมาของ payload และการตรวจสอบลายเซ็น
กำหนดค่าการแจ้งเตือนอีเวนต์แบบเรียลไทม์สำหรับการระบุอุปกรณ์ทุกครั้ง
เพิ่ม device fingerprinting เข้าสู่แอปพลิเคชัน Google Tag Manager ของคุณภายในเวลาไม่ถึง 5 นาที