Appearance
Analyzers
Analyzers provide access to statistical and/or ranking data of sales or views, based on the data collected by Relewise.
Typical use cases of Analyzers:
- Extracting data for use in data visualization tools such as PowerBI
- Creating custom reports or dashboards based on statistical data gleaned from Relewise
- Enriching product data with performance metrics such as cart opener percentage, popularity, ranking, etc. (this data can then be persisted on the products for later use in merchandising)
- Populating popularity and/or ranking on products for use outside of Relewise
The data returned from Analyzers can be segmented based on classifications.
Relewise supports the following analyzer, with more to come in the future:
ProductPopularityAnalyzer
The ProductPopularityAnalyzer
is used to query statistical data about your products and variants.
The ProductPopularityAnalyzer
is also used as the basis for the information shown on the MyRelewise Product Performance page. The advantage to using the API to pull this data via the analyzer yourself is that you gain access to a larger amount of results than the MyRelewise UI offers.
Thus, this analyzer performs the following functions:
- Ranking products by popularity on the basis of product views and sales. Popularity is compared between products/variants of the same brand, the same category, or globally.
- Expressing how likely a given product or variant is to be the very first product added to a cart (i.e. cart opener).
- Retrieving sales metrics for products and variants such as: Number of sales, number of views, average lines per order for orders where a given product was included, etc.
The request accepts multiple options, including options to decide if you want to calculate metrics at a product or variant level, as well as dimensioning/segmenting data by individual Classification keys. This is useful for narrowing the output and retrievning statistical information from a specific country or a defined group of people.
Below is an example of a ProductPopularityAnalyzer
request, to showcase the versatility of the analyzer tool.
A few notes on the Analyzer in use:
- The selected
language
andcurrency
of the request is not a segmentation filter. Instead, it merely defines in which language/currency to return values for multicurrency and multilingual fields. Data is segmented based on Classifications only, regardless of the selected language and currency. - When selecting the time interval for the request, the selector counts each day "in full", i.e. the date is always counted from midnight to midnight regardless of any specific timestamp provided.
SelectedProductProperties
allows you to pull any and all properties stored on your product objects. This can result in vast sums of data being transfered. Relewise suggests only requesting the Product Properties necessary; for integration purposes,ProductID
is typically enough.
csharp
var analyzer = new Analyzer(dataset, apiKey, url, TimeSpan.FromSeconds(10));
Language language = new Language("da-dk");
Currency currency = new Currency("DKK");
var request = new ProductPerformanceRequest(
language,
currency,
byVariant: true,
from: DateTime.UtcNow.AddDays(-30),
to: DateTime.UtcNow,
numberOfResultsPerRequest: 50,
skipNumberOfResults: 0)
{
SelectedProductProperties = new SelectedProductPropertiesSettings
{
AllData = false,
Brand = true,
DisplayName = true
},
VariantData = ProductPerformanceRequest.VariantDataOptions.FromVariant,
OrderBy = Relewise.Client.Requests.Analyzers.ProductPerformanceRequest.OrderByOptions.Sales
};
/*The following line instructs the analyzer to only include data tracked
with Classification key “Country” and value “DK”.
Replace this with your own key/values used as classifications in the target dataset,
or leave this line out completely to retrieve data for all classifications.*/
request.Classifications.Add(new KeyValuePair<string, string>("Country", "DK"));
analyzer.Analyze(request);