Show Menu
主题×

Target methods

Windows 8.1通用应用商店库提供的Target方法列表。
SDK 当前支持多种 Adobe Experience Cloud 解决方案,其中包括 Analytics、Target 和 Audience Manager。方法将根据解决方案来添加前缀。Analytics 方法具有“Target”前缀。
生命周期量度 将作为参数发送至每个 mbox 负载。
When you consume winmd methods from winJS (JavaScript), all methods automatically have their first letter lowercased.

类引用:TargetLocationRequest

资产

property Platform::String ^name; 
property Platform::String ^defaultContent; 
property Windows::Foundation::Collections::IMap<Platform::String^, Platform::Object^> ^parameters;

String constants

This information helps you set keys for custom parameters.
static property Platform::String ^TARGET_PARAMETER_ORDER_ID { 
  Platform::String ^get() { return L"orderId"; } 
} 
static property Platform::String ^TARGET_PARAMETER_ORDER_TOTAL { 
  Platform::String ^get() { return L"orderTotal"; } 
} 
static property Platform::String ^TARGET_PARAMETER_PRODUCT_PURCHASE_ID { 
  Platform::String ^get() { return L"productPurchasedId"; } 
} 
static property Platform::String ^TARGET_PARAMETER_CATEGORY_ID { 
  Platform::String ^get() { return L"categoryId"; } 
} 
static property Platform::String ^TARGET_PARAMETER_MBOX_3RDPARTY_ID { 
  Platform::String ^get() { return L"mbox3rdPartyId"; } 
} 
static property Platform::String ^TARGET_PARAMETER_MBOX_PAGE_VALUE { 
  Platform::String ^get() { return L"mboxPageValue"; } 
} 
static property Platform::String ^TARGET_PARAMETER_MBOX_PC { 
  Platform::String ^get() { return L"mboxPC"; } 
} 
static property Platform::String ^TARGET_PARAMETER_MBOX_SESSION_ID { 
  Platform::String ^get() { return L"mboxSession"; } 
} 
static property Platform::String ^TARGET_PARAMETER_MBOX_HOST { 
  Platform::String ^get() { return L"mboxHost"; } 
}

  • LoadRequest (winJS: loadRequest)
    向您配置的 Target 服务器发送 request ,并返回在块 callback 中生成的选件的字符串值。
    • 下面是这种方法对应的语法:
      static Windows::Foundation::IAsyncOperation<Platform::String ^> ^LoadRequest(TargetLocationRequest ^request);
      
      
    • 以下是这种方法的代码示例:
      var ADB = ADBMobile; 
      ADB.Target.loadRequest(heroBannerRequest).then(function(content) { 
      // do something with content returned from target server 
      });
      
      
  • CreateRequest (winJS: createRequest)
    通过给定参数创建 TargetLocationRequest 对象。
    • 下面是这种方法对应的语法:
      static TargetLocationRequest ^CreateRequest(Platform::String ^name, Platform::String ^defaultContent, Windows::Foundation::Collections::IMap<Platform::String^, Platform::Object^> ^parameters); 
      
      
    • 以下是这种方法的代码示例:
      var ADB = ADBMobile; 
      var heroBannerRequest = ADB.Target.createRequest("heroBanner", "default.png", null); 
      
      
  • CreateOrder​ConfirmRequest (winJS: createOrder​ConfirmRequest)
    通过给定参数创建 TargetLocationRequest 对象。
    • 下面是这种方法对应的语法:
      static TargetLocationRequest ^CreateOrderConfirmRequest(Platform::String ^name, Platform::String ^orderId, Platform::String ^orderTotal, Platform::String ^productPurchasedId, Windows::Foundation::Collections::IMap<Platform::String^, Platform::Object> ^parameters); 
      
      
    • 以下是这种方法的代码示例:
      var ADB = ADBMobile; 
      var orderConfirm = ADB.Target.createOrderConfirmRequest("orderConfirm", "order", "47.88", "3722", null); 
      
      
  • ClearCookies (winJS: clearCookies)
    清除当前设备上的应用程序的 Target Cookie。
    • 下面是这种方法对应的语法:
      static void ClearCookies(); 
      
      
    • 以下是这种方法的代码示例:
      ADBMobile.Target.clearCookies();
      
      
  • GetPcId (winJS: getPcId)
    返回当前设备的 PC ID Cookie。
    • 下面是这种方法对应的语法:
      static Platform::String ^GetPcId();
      
      
    • 以下是这种方法的代码示例:
      auto pcId = ADBMobile.Target.getPcId(); 
      
      
  • GetSessionId (winJS: getSessionId)
    返回当前设备的会话 ID Cookie。
    • 下面是这种方法对应的语法:
      static Platform::String ^GetSessionId(); 
      
      
    • 以下是这种方法的代码示例:
      auto sessionId = ADBMobile.Target.getSessionId();