如果您的實施仍使用 H 程式碼,Adobe 強烈建議您移轉至最新版的 AppMeasurement。我們建議您透過 Adobe Experience Platform Launch 實施 Analytics,不過也可以使用更新的 JavaScript 實施。
與 H 程式碼相比,AppMeasurement 有下列顯著變更:
<head>
標籤中。dynamicAccountSelection
、dynamicAccountMatch
和 dynamicAccountList
)。下列步驟概述典型的移轉工作流程。
AppMeasurement.js
檔案,以及媒體和整合模組。s_code.js
自訂內容複製到AppMeasurement.js
:將 s_code.js
中 DO NOT ALTER ANYTHING BELOW THIS LINE
區段之前的所有程式碼複製到 AppMeasurement.js
的開頭。s_code.js
檔案所列的每個外掛程式,而且請務必使用最新版本,包括媒體和整合模組。AppMeasurement.js
檔案上傳至網頁伺服器。AppMeasurement.js
:確認所有頁面都參考 AppMeasurement.js
,而非 s_code.js
。典型的 AppMeasurement.js
檔案。請務必將設定變數設定在 doPlugins
函數上方。
// Initialize AppMeasurement
var s = s_gi("examplersid");
/******** VISITOR ID SERVICE CONFIG - REQUIRES VisitorAPI.js ********/;
s.visitor=Visitor.getInstance("INSERT-MCORG-ID-HERE");
/************************** CONFIG SECTION **************************/;
/* You may add or alter any code config here. */
s.trackDownloadLinks = true;
s.trackExternalLinks = true;
s.trackInlineStats = true;
s.linkDownloadFileTypes = "exe,zip,wav,mp3,mov,mpg,avi,wmv,pdf,doc,docx,xls,xlsx,ppt,pptx";
s.linkInternalFilters = "javascript:,example.com";
s.usePlugins = true;
function s_doPlugins(s) {
// Use implementation plug-ins that are defined below in this section
}
s.doPlugins = s_doPlugins;
/* WARNING: Changing any of the below variables will cause drastic
changes to how your visitor data is collected. Changes should only be
made when instructed to do so by your account manager.*/
s.trackingServer="example.data.adobedc.net";
/************************** PLUGINS SECTION *************************/
// Copy and paste implementation plug-ins here. Plug-ins can then be used in the s_doPlugins(s) function above
/****************************** MODULES *****************************/
// Copy and paste implementation modules (Media, Integrate) here.
/* ============== DO NOT ALTER ANYTHING BELOW THIS LINE ! =============== */
在每個頁面上載入的典型程式碼。
<script src="AppMeasurement.js"></script>
<script language="JavaScript" type="text/javascript">
s.pageName = "Example page name";
s.eVar1 = "Example eVar value";
s.events = "event1";
s.t();
</script>
也務必在每一頁上加入對 AppMeasurement.js
和 VisitorAPI.js
的參考。如需詳細資訊,請參閱 JavaScript 實施。