Condividi tramite


StoreServicesCustomEventLogger.LogForVariation Method

Definition

Logs a view or conversion event for an A/B test from your app to Partner Center.

public:
 virtual void LogForVariation(StoreServicesExperimentVariation ^ experimentVariation, Platform::String ^ eventName) = LogForVariation;
void LogForVariation(StoreServicesExperimentVariation const& experimentVariation, winrt::hstring const& eventName);
public void LogForVariation(StoreServicesExperimentVariation experimentVariation, string eventName);
function logForVariation(experimentVariation, eventName)
Public Sub LogForVariation (experimentVariation As StoreServicesExperimentVariation, eventName As String)

Parameters

experimentVariation
StoreServicesExperimentVariation

An object that provides context about the experiment variation that your app is processing. Pass the StoreServicesExperimentVariation object that you retrieved via the GetCachedVariationAsync or GetRefreshedVariationAsync method.

eventName
String

Platform::String

winrt::hstring

The name of the view or conversion event to send to Partner Center. This value must match the name of a view or conversion event that you associated with the current experiment in the Experiments page of Partner Center.

Remarks

If you have configured an app experiment with A/B testing in Partner Center, use the Log method to log data about view and conversion events from your app to the dashboard. For a code example that demonstrates how to use this method, see Code your experiment in your app.

Note

This method must be called on the UI thread.Events that you log using this method also appear in the Custom events section of the Usage report in Partner Center.

Applies to

See also