不了解何謂 UET?查看 什麼是 UET?它能為我提供哪些幫助?
我們更新了 JavaScript UET 標籤的語法。建議您更新自己網站程式碼中任何現有的 UET 標籤來使用新語法。
新的語法:
舊語法 | 新語法 |
---|---|
ea | event |
ec | event_category |
el | event_label |
ev | event_value |
gv | revenue_value |
gc | currency |
舊語法 (自訂事件):
<script>
window.uetq = window.uetq || [];
window.uetq.push ({'ec':'Replace_with_Event_Category', 'ea':'Replace_with_Event_Action', 'el':'Replace_with_Event_Label', 'ev':'Replace_with_Event_Value'});
</script>
新語法 (自訂事件):
<script>
window.uetq = window.uetq || [];
window.uetq.push ('event', 'Replace_with_Event_Action', {'event_category':'Replace_with_Event_Category', 'event_label':'Replace_with_Event_Label', 'event_value':'Replace_with_Event_Value'});
</script>
舊語法 (變動收入):
<script>
window.uetq = window.uetq || [];
window.uetq.push ({'gv':'Replace_with_Revenue_Value', 'gc':'Replace_with_Currency_Code'});
</script>
新語法 (自訂事件):
<script>
window.uetq = window.uetq || [];
window.uetq.push ('event', '', {'revenue_value':'Replace_with_Revenue_Value', 'currency':'Replace_with_Currency_Code'});
</script>
追蹤所有四種自訂事件類型:
<script>
window.uetq = window.uetq || [];
window.uetq.push ('event', 'Contoso_Event_Action', {'event_category':'Contoso_Event_Category', 'event_label':'Contoso_Event_Label', 'event_value':'Contoso_Event_Value'});
</script>
不追蹤事件動作,但追蹤其餘三種事件類型(請注意,'event' 還在,只是值的部分是空的):
<script>
window.uetq = window.uetq || [];
window.uetq.push ('event', '', {'event_category':'Contoso_Event_Category', 'event_label':'Contoso_Event_Label', 'event_value':'Contoso_Event_Value'});
</script>
只追蹤事件動作 (請注意,其餘不必要的事件類型都已移除):
<script>
window.uetq = window.uetq || [];
window.uetq.push ('event', 'Contoso_Event_Action', {});
</script>