context
context屬性是字串陣列,可決定Web SDK可自動收集的內容。 雖然此資料可提供絕佳價值,但若省略其中部分資料,則可讓您遵守組織的隱私權政策。
內容關鍵字和XDM元素
如果您包含指定的上下文關鍵字,Web SDK會自動填入其所有關聯的XDM元素。 如果您想在允許其他專案時省略特定的XDM專案,可以使用onBeforeEventSend清除值。 如果您在頁面上傳送多個事件,Web SDK會在每SendEvent個呼叫中包含這些欄位。
Web
"web"關鍵字會收集有關目前頁面的資訊。
xdm.web.webPageDetails.URLhttps://example.com/index.htmlxdm.web.webReferrer.URLhttp://example.org/linkedpage.html裝置
"device"關鍵字會收集使用者裝置的相關資訊。
xdm.device.screenHeight900xdm.device.screenWidth1440xdm.device.screenOrientationlandscape或portrait環境
"environment"關鍵字會收集有關使用者瀏覽器的資訊。
browser。xdm.environment.typebrowserxdm.environment.browserDetails.viewportHeight679xdm.environment.browserDetails.viewportWidth642地方背景
"placeContext"關鍵字會收集有關使用者位置的資訊。
xdm.placeContext.localTimezoneOffset360xdm.placeContext.geo.countryCodeUSxdm.placeContext.geo.stateProvinceCAxdm.placeContext.geo._schema.latitude37.3307447xdm.placeContext.geo._schema.longitude-121.8945965時間戳記
timestamp關鍵字會收集有關事件時間戳記的資訊。 無法移除這個部分的內容。
實作細節
implementationDetails關鍵字會收集用來收集事件之SDK版本的相關資訊。
xdm.implementationDetails.namehttps://ns.adobe.com/experience/alloy。 當資料庫作為標籤延伸的一部分使用時,值為https://ns.adobe.com/experience/alloy+reactor。xdm.implementationDetails.version+聯結的標籤擴充功能版本。 例如,如果程式庫版本是2.1.0,而標籤延伸版本是2.1.3,則值將是2.1.0+2.1.3。browser。xdm.implementationDetails.environmentbrowser高平均資訊量使用者端提示 high-entropy-client-hints
"highEntropyUserAgentHints"關鍵字會收集使用者裝置的詳細資訊。 此資料包含在傳送給Adobe之請求的HTTP標頭中。 資料到達Edge網路後,XDM物件會填入其個別的XDM路徑。 如果您在sendEvent呼叫中設定個別XDM路徑,則其優先於HTTP標頭值。
如果您在設定您的資料流時使用裝置查詢,則資料可以清除掉,以支援裝置查詢值。 某些使用者端提示欄位和裝置查詢欄位不得存在於相同點選中。
Sec-CH-UA-Platform-Versionxdm.environment.browserDetails.userAgentClientHints.platformVersion10.15.7Sec-CH-UA-Archxdm.environment.browserDetails.userAgentClientHints.architecturex86Sec-CH-UA-Modelxdm.environment.browserDetails.userAgentClientHints.modelIntel Mac OS X 10_15_7Sec-CH-UA-Bitnessxdm.environment.browserDetails.userAgentClientHints.bitness64Sec-CH-UA也會收集這個專案。Sec-CH-UA-Full-Version-Listxdm.environment.browserDetails.userAgentClientHints.vendorGoogleSec-CH-UA也會收集這個專案。Sec-UA-Full-Version-Listxdm.environment.browserDetails.userAgentClientHints.brandChromeSec-CH-UA也會收集這個專案。 系統不會自動收集精確的瀏覽器版本。Sec-UA-Full-Version-Listxdm.environment.browserDetails.userAgentClientHints.version105使用Web SDK標籤擴充功能收集內容資訊
在設定標籤延伸模組時,內容資訊設定是選項按鈕和核取方塊的組合。 每個核取方塊都會對應至一個內容關鍵字。
- 使用您的Adobe ID憑證登入experience.adobe.com。
- 導覽至 資料彙集 > 標籤。
- 選取所需的標籤屬性。
- 導覽至 擴充功能,然後按一下Adobe Experience Platform Web SDK卡片上的 設定。
- 向下捲動至資料彙集區段,然後選取 所有預設內容資訊 或 特定內容資訊。
- 如果您選取 特定內容資訊,請啟用每個所需內容資訊元素旁的核取方塊。
- 按一下 儲存,然後發佈您的變更。
使用Web SDK JavaScript資料庫收集內容資訊
執行configure命令時設定context字串陣列。 如果您在設定SDK時省略此屬性,則預設會收集除"highEntropyUserAgentHints"以外的所有內容資訊。 如果您想要收集高平均資訊量使用者端提示,或您想要從資料收集中忽略其他內容資訊,請設定此屬性。 字串可以包含在任何順序中。
context陣列字串中包含每個值。 預設context值會省略highEntropyUserAgentHints,如果您設定context屬性,則任何省略的值都不會收集資料。alloy("configure", {
datastreamId: "ebebf826-a01f-4458-8cec-ef61de241c93",
orgId: "ADB3LETTERSANDNUMBERS@AdobeOrg",
context: ["web", "device", "environment", "placeContext", "highEntropyUserAgentHints"]
});