getMarketingCloudVisitorID

getMarketingCloudVisitorID 傳回 Experience Cloud 訪客 ID。

語法: var *變數名稱* = visitor.getMarketingCloudVisitorID()

此方法通常用於需要讀取訪客ID的自訂解決方案。 標準實作不會使用此函數。getMarketingCloudVisitorID 也會使用回呼函數讀取 Analytics ID,並將其帶入您的系統或應用程式。

//callback function 
var useMarketingCloudID = function(id){ 
     //whatever your function does with the Experience Cloud ID 
}; 
 
//get the Experience Cloud ID and pass it to the function 
var mcID = visitor.getMarketingCloudVisitorID(useMarketingCloudID)
秘訣

如果您是 Analytics 客戶,請一併檢查 Analytics ID,並將其傳送至您的函數。例如,將隱藏表單元素中的訪客 ID 傳遞至使用資料插入 API 的伺服器端時,您會想要有兩個識別碼。在此情況下,您應該收集並傳回 Experience Cloud 與 Analytics 訪客 ID。請參閱取得 Analytics 訪客 ID

本頁內容

Adobe Summit Banner

A virtual event April 27-28.

Expand your skills and get inspired.

Register for free
Adobe Summit Banner

A virtual event April 27-28.

Expand your skills and get inspired.

Register for free
Adobe Maker Awards Banner

Time to shine!

Apply now for the 2021 Adobe Experience Maker Awards.

Apply now
Adobe Maker Awards Banner

Time to shine!

Apply now for the 2021 Adobe Experience Maker Awards.

Apply now