Liste des méthodes de Cible fournies par la bibliothèque de plateformes Windows universelles.
Le SDK prend actuellement en charge plusieurs solutions Adobe Experience Cloud, notamment Analytics, Cible et Audience Manager.
Les mesures de cycle de vie sont envoyées en tant que paramètres à chaque chargement de mbox.
Lorsque vous utilisez winmd
des méthodes de winJS (JavaScript), toutes les méthodes ont automatiquement leur première lettre minuscule.
property Platform::String ^name;
property Platform::String ^defaultContent;
property Windows::Foundation::Collections::IMap<Platform::String^, Platform::Object^> ^parameters;
Ces informations vous aident à définir les clés des paramètres personnalisés.
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)
Sends request
to your configured Target server and returns the string value of the offer generated in a block callback
.
Voici la syntaxe de cette méthode :
static Windows::Foundation::IAsyncOperation<Platform::String ^> ^LoadRequest(TargetLocationRequest ^request);
Voici l’exemple de code pour cette méthode :
var fADB = ADBMobile;
ADB.Target.loadRequest(heroBannerRequest).then(function(content){
//do something with content returned from target server
});
CreateRequest (winJS: createRequest)
Creates a TargetLocationRequest
object with the given parameters.
Voici la syntaxe de cette méthode :
static TargetLocationRequest ^CreateRequest(Platform::String ^name, Platform::String ^defaultContent,Windows::Foundation::Collections::IMap<Platform::String^,Platform::Object^> ^parameters);
Voici l’exemple de code pour cette méthode :
var ADB = ADBMobile;
var heroBannerRequest = ADB.Target.createRequest("heroBanner","default.png", null);
CreateOrder ConfirmRequest (winJS : createOrder ConfirmRequest)
Creates a TargetLocationRequest
object with the given parameters.
Voici la syntaxe de cette méthode :
static TargetLocationRequest ^CreateOrderConfirmRequest(Platform::String ^name, Platform::String ^orderId,Platform::String ^orderTotal,Platform::String ^productPurchasedId,Windows::Foundation::Collections::IMap<Platform::String^,Platform::Object^> ^parameters);
Voici l’exemple de code pour cette méthode :
varADB = ADBMobile;
var orderConfirm = ADB.Target.createOrderConfirmRequest("orderConfirm","order","47.88","3722",null);
ClearCookies (winJS: clearCookies)
Efface les cookies de Cible de l’application sur le périphérique actuel.
Voici la syntaxe de cette méthode :
static void ClearCookies();
Voici l’exemple de code pour cette méthode :
ADBMobile.Target.clearCookies();
GetPcId (winJS : getPcId)
Renvoie le cookie d'ID de PC pour le périphérique actuel.
Voici la syntaxe de cette méthode :
staticPlatform::String ^GetPcId();
Voici l’exemple de code pour cette méthode :
autopcId = ADBMobile.Target.getPcId();
GetSessionId (winJS : getSessionId)
Renvoie le cookie ID de session pour le périphérique actuel.
Voici la syntaxe de cette méthode :
staticPlatform::String ^GetSessionId();
Voici l’exemple de code pour cette méthode :
autosessionId=ADBMobile.Target.getSessionId();