檢視 TAmedia Tracking Guide EN 的原始碼
←
TAmedia Tracking Guide EN
跳至導覽
跳至搜尋
由於下列原因,您沒有權限進行編輯此頁面的動作:
您請求的操作只有這個群組的使用者能使用:
使用者
您可以檢視並複製此頁面的原始碼。
= TAMedia Tracking Integration Guide = This document explains how to integrate the tracking code provided by TAMedia into a website. It covers the base tracking code, category page view events, custom events, and important notes. ---- == 1. Base Tracking Code Integration == === Placement === Insert the following code '''within the <head> tag''', right '''above the </head> tag'''. If your page already includes this code, '''no need to insert repeatedly.'''. This script is TAMedia’s main tracking script and will automatically load the required tracking tool (''pixel.js''). <syntaxhighlight lang="html"> <script type="text/javascript"> (function(a,e,f,g,b,c,d){a.taq||(a[b]=a[b]||function(){a[b].q.push(arguments);a[b].tamTrackSendStatus&&a[b].tamTrackSendStatus()},a[b].q=a[b].q||[],c=e.createElement(f),d=e.getElementsByTagName(f)[0],c.async=1,c.src="https://adc.tamedia.com.tw/tr/"+g,d.parentNode.insertBefore(c,d))})(window,document,"script","pixel.js","taq"); </script> </syntaxhighlight> ---- == 2. Page View Event == === When to Trigger === When a user visits a page, execute the following script to send a corresponding event. This records a ''ViewContent'' event indicating that the user visited a specific page. <syntaxhighlight lang="html"> <script type="text/javascript"> taq('track', '{your-campaign-id-goes-here}', 'ViewContent'); </script> </syntaxhighlight> ---- == 3. Custom Event Tracking == === Purpose of Custom Events === When specific actions occur on your site (e.g., registration completed, a particular button clicked, a form successfully submitted), execute the following code to log the event. <code>{your-event-name-goes-here}</code> is a custom event name (e.g., <code>Customer00001</code>) that must be pre-defined by TAMedia for each campaign. This code logs a custom behavioral event. The event name must match the one configured in TAMedia’s system. <syntaxhighlight lang="html"> <script type="text/javascript"> taq('trackCustom', '{your-campaign-id-goes-here}', '{your-event-name-goes-here}'); </script> </syntaxhighlight> ---- == Notes == * The identifier <code>'{your-campaign-id-goes-here}'</code> should be configured according to the specific campaign. * The <code>taq</code> object must be called '''after''' the base tracking script has been executed; otherwise, errors may occur. * To track multiple different events, you can reuse <code>taq('trackCustom', ...)</code> with different event names. * To confirm successful tracking, please contact the TAMedia technical team for reporting or verification support. ---- '''Contact Information''' For further integration support, please contact the TAMedia technical support team.
返回到「
TAmedia Tracking Guide EN
」。
導覽選單
個人工具
登入
命名空間
頁面
討論
變體
已展開
已摺疊
視圖
閱讀
檢視原始碼
檢視歷史
更多
已展開
已摺疊
搜尋
導覽
首頁
近期變更
隨機頁面
有關 MediaWiki 的說明
工具
連結至此的頁面
相關變更
特殊頁面
頁面資訊