Skip to main content
Skip table of contents

Enabling performance logging for Viewport

In Scroll Viewport you are able to track in detail the performance on how long a page needs to load in Scroll Viewport.
This is especially helpful if your Viewport loads slowly and you need to identify the reason. This could be a macro on the page or the code of the theme or anything else.

How to enable Performance Logging for a Viewport

To track down the performance of a viewport site you can do the following:

  1. Within your advanced plugin settings set the allowPerformanceLogging to true.
  2. Do the request either via:
    1. Request Header
      On your request send an additional header: X-Scroll-Viewport-Enable-Performance-Statistics = true
      We recommend to just download a browser extension like ModHeader where you can set specific headers.
    2. Query Parameter (Scroll Viewport 2.17.6 and later)
      Append the URL query parameter  X-Scroll-Viewport-Enable-Performance-Statistics=true to individual requests.
      The query parameter approach can also be applied to REST calls to the /rest/scroll-viewport/latest/tree/children resource.
  3. (Optional) Turn on DEBUG logging for the package com.k15t.scroll.viewport.infra.performance via
    General Configuration > Profiling and Logging 
    to get the same trace in the server logs. This is a prerequisite for analysing any URLs that don't return HTML.
  4. If the advanced plugin setting is enabled and either the header or the query parameter are given, you can call the Viewport URL that you want to analyse.
    The performance logging will then be visible in the HTML of the page you called and (if step 3 was done) in the server logs. 
    On inspecting the HTML with the Browser Developer Tools you can see a comment within the HTML (before the closing body tag) on the bottom of the page. 

Please make sure to append the query parameter with a '?' question mark to the URL if there are no other query parameters present and with a '&' if the URL already has query parameters.

Your Url should look something like this:

https://www.example.com/space/page-123.html?X-Scroll-Viewport-Enable-Performance-Statistics=true
https://www.example.com/space/page-123.html?parameter=true&X-Scroll-Viewport-Enable-Performance-Statistics=true


Example output of a performance log:


JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.