Area: Episerver Customer-Centric DXP
Applies to versions: Not applicable

Consumption metrics

Recommendations [hide]

This topic describes the service consumption metrics, definitions, and setup  of usage parameters for solutions running in Episerver Customer-Centric Digital Experience Platform (DXP). It is important that the usage parameters are correctly set up, especially for single page applications, to ensure that the website traffic volume monitoring is correct.

How it works

The consumption levels are defined when setting up service tiers, based on the estimated amount of generated traffic, as described in the  Episerver DXP Service Description. The service consumption is measured thorugh the usage parameters.

An example of a usage parameter is the view of a page on a customer website provided by a service instance under an Episerver DXP subscription. If a visitor clicks reload after reaching the page, this is counted as an additional page view. If a visitor navigates to a different page, and returns to the original page, an additional page view is recorded.

You can see the consumption metrics and traffic volumes in Application Insight (requires access).

Usage parameter definitions

  • Page view. Tracks page impressions, which is to say in every occurrence where a page is displayed to a visitor, a page view is counted. For websites that means page views usually correlate with events where the browser location changes, for example because a visitor clicked a link, navigated browser history, reloaded the current page or typed in a new address.
  • Page. A composition of content that is not a static file but has a URL and can be loaded for example in a browser. Depending on implementation, a page may map to an instance of a page type in Episerver CMS, or to a product in Commerce, but may also include for example blocks, external data, or aggregates of external data or other pages.
  • Static file. An uploaded or deployed file, for example a PDF, or an image, or a CSS which has a URL, and can be downloaded as-is by visitors using for example a browser. 

These parameters are the base of the usage metrics. Application Insight monitoring is configured automatically for all sites running in DXP, but depending on the site architecture, some further configuration might be needed to fully use its features.

Single page applications

By default, page views are tracked when a new page loads into the browser. Websites based on the Single Page Application (SPA) concept are different, since these interact with visitors by dynamically rewriting the current page, and do not need page reloading during usage. For these websites, you specifically need to configure the page view tracking.

Application Insights is already loaded when the page loads, and the following code is used to track a custom page view:

if (typeof appInsights !== 'undefined') 

See Microsoft Documentation for additional information. See also example of how to Add Application Insights to an Angular SPA.

Related topics

Do you find this information helpful? Please log in to provide feedback.

Last updated: Apr 02, 2020

Recommendations [hide]