如果可以的話,我們建議您使用 JavaScript 版本的 UET 標籤。深入了解 JavaScript UET 標籤。
通用活動追蹤 (UET) 是 Microsoft 架構,可擷取您網站上的使用者參與情況資料,並為商務啟用成交追蹤 (例如購買或潛在客戶)、客群目標設定 (例如再行銷)、自動出價和 Microsoft Advertising 等功能。深入了解 UET,以及其在 Microsoft Advertising 中對成交追蹤和再行銷的重要性。
建議您使用 JavaScript 版本的 UET 標籤,並將其安裝到您網站上的所有頁面上。JavaScript UET 標籤會為成交追蹤和再行銷擷取更豐富的資料。不過,如果 JavaScript 版本的標籤不可行,您也可以使用非 JavaScript 版本。其中一個方法就是透過 <img> 標籤。
UET 架構定義多個事件:
多個 UET 事件可在同一次網頁瀏覽中觸發。 會使用 mid 參數連結同一頁面上觸發的不同事件。
透過無指令碼方式實作的 UET 看起來會像是:
當事件觸發後,UET 會觸發此端點:https://bat.bing.com/action/0?
預期的回應是:204
MSCLKID 是用於成交屬性,且是在點選廣告時產生。啟用自動標記Microsoft點擊識別碼後,這個識別碼會附加到登錄頁面 URL 後面。這應該會儲存在您網站上的第一方 Cookie 中,並與 UET 呼叫一起傳送。
MSCLKID 是一種 GUID,例如 "cdd4afcccb1c9a4cad9544dd7e5006d5"。
建議的 Cookie 名稱:_uetmsclkid
Cookie 有效期限:90 天
請見以下範例:
<script> function setCookie(name, value, days) { var date = new Date(); date.setTime(date.getTime() + days * 864e5); var expires = "; expires=" + date.toGMTString(); document.cookie = name + "=" + value + expires; } function getParam(p) { var match = RegExp("[?&]" + p + "=([^&]*)").exec(window.location.search); return match && decodeURIComponent(match[1].replace(/\+/g, " ")); } var msclkid = getParam("_uetmsclkid "); if (msclkid) { setCookie("_uetmsclkid", msclkid, 90); } </script>
MID 允許從同一頁面加入不同事件,例如 pageLoad 和自訂事件。以下是用於產生 MID 的程式碼範例:
<script> this._S4 = function () { return Math.floor((1 + Math.random()) * 0x10000) .toString(16) .substring(1); }; this.getGuid = function () { var guid = this._S4() + this._S4() + "-" + this._S4() + "-" + this._S4() + "-" + this._S4() + "-" + this._S4() + this._S4() + this._S4(); return guid; }; </script>
如要查看您可以擷取的所有 pageLoad 或自訂事件參數,請參閱此表格。
項目會擷取產品細節,例如產品識別碼、數量和價格。可在涉及多個產品的頁面瀏覽和事件中擷取,例如:「新增至購物車」事件或瀏覽購物車事件。
https://bat.bing.com/action/0? ti=1234567&
ver=2.3&
evt=pageLoad&
mid=d34f6979-ecfc-ecac-745d-e40447afd9b2&
uid=3966616149922&
vid=a5ia770-97ac68-cd211&
msclkid=292049a17e2413e3a4081719e839afe6-0&
rn=692799&
p=https%3A%2F%2Fwww.contoso.com%2Fsearch%3Fq%3Dwall%2Bclock&
r=https%3A%2F%2Fwww.bing.com%2F&
tl=Wall%20Clocks&
kw=clocks,homedecor
https://bat.bing.com/action/0? ti=1234567&
ver=2.3&
mid=d34f6979-ecfc-ecac-745d-e40447afd9b2&
uid=3966616149922&
vid=a5ia770-97ac68-cd211&
msclkid=292049a17e2413e3a4081719e839afe6-0&
rn=692799&
evt=custom&
pagetype=home
https://bat.bing.com/action/0? ti=1234567&
ver=2.3&
mid=d34f6979-ecfc-ecac-745d-e40447afd9b2&
uid=3966616149922&
vid=a5ia770-97ac68-cd211&
msclkid=292049a17e2413e3a4081719e839afe6-0&
rn=692799&
evt=custom&
pagetype=category&
ecomm_category=cat123&
prodid=pid1,pid2,pid3,pid4,pid5,pid6,pid7,pid8,pid9,pid10
https://bat.bing.com/action/0? ti=1234567&
ver=2.3&
mid=d34f6979-ecfc-ecac-745d-e40447afd9b2&
uid=3966616149922&
vid=a5ia770-97ac68-cd211&
msclkid=292049a17e2413e3a4081719e839afe6-0&
rn=692799&
evt=custom&
pagetype=searchresults&
search_term=wall%20clocks&
prodid=pid1,pid2,pid3,pid4,pid5,pid6,pid7,pid8,pid9,pid10
https://bat.bing.com/action/0? ti=1234567&
ver=2.3&
mid=d34f6979-ecfc-ecac-745d-e40447afd9b2&
uid=3966616149922&
vid=a5ia770-97ac68-cd211&
msclkid=292049a17e2413e3a4081719e839afe6-0&
rn=692799&
evt=custom&
pagetype=product&
prodid=pid1
https://bat.bing.com/action/0? ti=1234567&
ver=2.3&
mid=d34f6979-ecfc-ecac-745d-e40447afd9b2&
uid=3966616149922&
vid=a5ia770-97ac68-cd211&
msclkid=292049a17e2413e3a4081719e839afe6-0&
rn=692799&
evt=custom&
ea=add_to_cart&
pagetype=product&
prodid=pid12345&
items=id%3Dprod12345%26quantity%3D2%26price%3D25.1&
gv=50.2&
gc=usd
https://bat.bing.com/action/0? ti=1234567&
ver=2.3&
mid=d34f6979-ecfc-ecac-745d-e40447afd9b2&
uid=3966616149922&
vid=a5ia770-97ac68-cd211&
msclkid=292049a17e2413e3a4081719e839afe6-0&
rn=692799&
evt=custom&
pagetype=cart&
prodid=prod12345,prod2345&
items=id%3Dprod12345%26quantity%3D2%26price%3D25.1%2Cid%3Dprod2345%26quantity%3D1%26price%3D121.1&
gv=171.3&
gc=usd
https://bat.bing.com/action/0? ti=1234567&
ver=2.3&
mid=d34f6979-ecfc-ecac-745d-e40447afd9b2&
uid=3966616149922&
vid=a5ia770-97ac68-cd211&
msclkid=292049a17e2413e3a4081719e839afe6-0&
rn=692799&
evt=custom&
ea=purchase&
pagetype=purchase&
prodid=prod12345,prod2345&
items=id%3Dprod12345%26quantity%3D2%26price%3D25.1%2Cid%3Dprod2345%26q uantity%3D1%26price%3D121.1&
gv=171.3&
gc=usd
https://bat.bing.com/action/0? ti=1234567&
ver=2.3&
mid=d34f6979-ecfc-ecac-745d-e40447afd9b2&
uid=3966616149922&
vid=a5ia770-97ac68-cd211&
msclkid=292049a17e2413e3a4081719e839afe6-0&
rn=692799&
evt=custom&
ea=add_to_cart&
ec=shoes&
el=recommendations&
ev=23.99
<head>
<title>UET IMG based example</title>
<meta charset="utf-8" />
<!--BEGIN: Microsoft Advertising UET tag.-->
<img src="//bat.bing.com/action/0?ti=1234567&
ver=2.3&
evt=pageLoad&
mid=d34f6979-ecfc-ecac745d-e40447afd9b2&
uid=3966616149922&
vid= a5ia770-97ac68-cd211&
msclkid=292049a17e2413e3a4081719e839afe6-0&
rn=692799&
p= ttps%3A%2F%2Fwww.contoso.com%2Fsearch%3Fq%3Dwall%2Bclock&
r=https%3A%2F%2Fwww.bing.com%2F&
tl= Wall%20Clocks&
kw=clocks,homedecor" height="0" width="0" style="display:none; visibility: hidden;" />
<!--END: Microsoft Advertising UET tag-->
<link href="StyleSheet/styles.css" rel="stylesheet">
</head>