Analytics for Target (A4T) 報告

Adobe Target支援裝置上決策和伺服器端Target活動的A4T報告。 啟用A4T報表時有兩個設定選項:

  • Adobe Target自動將分析裝載轉送至Adobe Analytics,或
  • 使用者向Adobe Target要求分析裝載。 (Adobe Target會將Adobe Analytics裝載傳回給呼叫者。)
NOTE
裝置上決策僅支援A4T報告,其中的Adobe Target會自動將分析裝載轉送至Adobe Analytics。 不支援從Adobe Target擷取分析裝載。

先決條件

  1. 在Adobe Target UI中設定活動,將Adobe Analytics設為報表來源,並確定已啟用A4T帳戶。
  2. API使用者會產生Adobe Marketing Cloud訪客ID,並確保此ID在執行Target請求時可供使用。

Adobe Target自動轉送分析裝載

如果提供了以下識別碼,Adobe Target可以自動將分析裝載轉送至Adobe Analytics:

  1. supplementalDataId:用來在Adobe Analytics和Adobe Target之間拼接的識別碼。 為了讓Adobe Target和Adobe Analytics能夠正確地將資料拼接在一起,相同的supplementalDataId需要傳遞給Adobe Target和Adobe Analytics。
  2. trackingServer: Adobe Analytics伺服器。
Node.js
code language-js line-numbers
const TargetClient = require("@adobe/target-nodejs-sdk");

const CONFIG = {
  client: "acmeclient",
  organizationId: "1234567890@AdobeOrg"
};

const targetClient = TargetClient.create(CONFIG);

targetClient.getOffers({
  request: {
    id: {
      marketingCloudVisitorId : "2304820394812039",
      tntId: "d359234570e044f14e1faeeba02d6ab23439914e.35_0",
      thirdPartyId:"23423432"
    },
    experienceCloud: {
      analytics: {
        logging: "server_side",
        supplementalDataId: "7D3AA246CC99FD7F-1B3DD2E75595498E",
        trackingServer: "jimsbrims.sc.omtrds.net"
      }
    },
    execute: {
      mboxes: [{
        name: "some-mbox"
      }]
    }
  }
})
.then(console.log)
.catch(console.error);
Java
code language-java line-numbers
ClientConfig config = ClientConfig.builder()
  .client("acmeclient")
  .organizationId("1234567890@AdobeOrg")
  .build();
TargetClient targetClient = TargetClient.create(config);

VisitorId id = new VisitorId()
  .tntId("d359234570e044f14e1faeeba02d6ab23439914e.35_0")
  .thirdPartyId("B234A029348")
  .marketingCloudVisitorId("10527837386392355901041112038610706884");
Context context = new Context().channel(ChannelType.WEB);
MboxRequest mbox = new MboxRequest()
  .name("some-mbox")
  .index(0);
ExecuteRequest executeRequest = new ExecuteRequest()
  .mboxes(Arrays.asList(mbox));

AnalyticsRequest analyticsRequest =
    new AnalyticsRequest()
        .trackingServer("jimsbrims.sc.omtrds.net")
        .logging(LoggingType.SERVER_SIDE)
        .supplementalDataId("7D3AA246CC99FD7F-1B3DD2E75595498E");
ExperienceCloud expCloud =
    new ExperienceCloud()
        .setAnalytics(analyticsRequest);

TargetDeliveryRequest request = TargetDeliveryRequest.builder()
  .context(context)
  .execute(executeRequest)
  .experienceCloud(expCloud)
  .build();

TargetDeliveryResponse offers = targetClient.getOffers(request);

使用者從Adobe Target擷取分析裝載

使用者可以擷取特定mbox的Adobe Analytics裝載,然後透過資料插入API傳送給Adobe Analytics。 觸發Adobe Target要求時,請將client_side傳遞至要求中的logging欄位。 如果在使用Analytics作為報表來源的活動中存在指定的mbox,則會傳回裝載。

Node.js
code language-js line-numbers
const TargetClient = require("@adobe/target-nodejs-sdk");
const CONFIG = {
  client: "acmeclient",
  organizationId: "1234567890@AdobeOrg"
};
const targetClient = TargetClient.create(CONFIG);
targetClient.getOffers({
  request: {
    id: {
      marketingCloudVisitorId : "2304820394812039",
      tntId: "d359234570e044f14e1faeeba02d6ab23439914e.35_0",
      thirdPartyId:"23423432"
    },
    experienceCloud: {
      analytics: {
        logging: "client_side"
      }
    },
    execute: {
      mboxes: [{
        name: "some-mbox"
      }]
    }
  }
})
.then(console.log)
.catch(console.error);
Java
code language-java line-numbers
ClientConfig config = ClientConfig.builder()
  .client("acmeclient")
  .organizationId("1234567890@AdobeOrg")
  .build();
TargetClient targetClient = TargetClient.create(config);

VisitorId id = new VisitorId()
  .tntId("d359234570e044f14e1faeeba02d6ab23439914e.35_0")
  .thirdPartyId("B234A029348")
  .marketingCloudVisitorId("10527837386392355901041112038610706884");
Context context = new Context().channel(ChannelType.WEB);
MboxRequest mbox = new MboxRequest()
  .name("some-mbox")
  .index(0);
ExecuteRequest executeRequest = new ExecuteRequest()
  .mboxes(Arrays.asList(mbox));

AnalyticsRequest analyticsRequest =
    new AnalyticsRequest()
        .logging(LoggingType.CLIENT_SIDE);
ExperienceCloud expCloud =
    new ExperienceCloud()
        .setAnalytics(analyticsRequest);

TargetDeliveryRequest request = TargetDeliveryRequest.builder()
  .context(context)
  .execute(executeRequest)
  .experienceCloud(expCloud)
  .build();

TargetDeliveryResponse offers = targetClient.getOffers(request);

指定logging = client_side後,您將會在mbox欄位中接收裝載。

如果來自Target的回應在analytics -> payload屬性中包含任何內容,請將其轉寄給Adobe Analytics。 Adobe Analytics知道如何處理此承載。 您可使用下列格式,在GET要求中完成此作業:

https://{datacollectionhost.sc.omtrdc.net}/b/ss/{rsid}/0/CODEVERSION?pe=tnt&tnta={payload}&mid={mid}&vid={vid}&aid={aid}

查詢字串引數和變數

欄位名稱
必要
說明
rsid
報表套裝 ID
pe
頁面事件。 一律設為tnt
tnta
Target伺服器在analytics -> payload -> tnta中傳回的分析裝載
mid
Marketing Cloud 訪客 ID

必要的標頭值

標頭名稱
標頭值
主機
Analytics資料收集伺服器(如: adobeags421.sc.omtrdc.net

範例A4T資料插入HTTP Get呼叫

https://demo.sc.omtrdc.net/b/ss/myCustomRsid/0/MOBILE-1.0?pe=tnt&tnta=285408:0:0|2&mid=2304820394812039
recommendation-more-help
6906415f-169c-422b-89d3-7118e147c4e3