How to use Network Logs?

Kamil Drazkiewicz
Kamil Drazkiewicz2 minApril 10, 2022

Network logs

Dev Tools Network gives you the power to capture network activity like XHR and Fetch requests for each user session. Each individual request contains request and response headers, and request and response bodies.

network logs tab

Headers

LiveSession captures all request headers except authorization, cookie, and proxy-authorization. Values for those headers are omitted due to security reasons, but you can see that the header was a part of the request. Omitted values are displayed as [omitted].

headers

Bodies

LiveSesson captures bodies for text, json, arraybuffer, document and blob data types. JSON type data is automatically prettified for better display.

body

Also, big response and request bodies are truncated for performance reasons.

Allowlisting the requests

Changes to rules are applied to future sessions. Since requests can contain private or sensitive information, LiveSession doesn’t capture any requests by default. You have to define the list of URL patterns you would like to capture on your own.

To get started, first you will need to enable Network logs under Settings > Websites -> {Your website} -> General.

network log option

Next, go to Network allowlist tab and click Add Rule.

allowlist tab

Enter the URL pattern of the URL you would like to allow to be recorded as a regexp pattern. Below are a few examples:

  • To capture every single request use .* as a pattern.
  • To capture requests only for example.com domain use .*example\.com.*

add rule modal

For better control of what you want to record, you can use multiple patterns. For instance, you can enable to capture all requests from your domain with request/response bodies and then exclude sensitive URLs with another pattern. Rules with disabled request or response bodies are always prioritized during the process of determining if the body should be recorded.

Example:

  • .*example\.com.* with Request body enabled and Response body enabled
  • .*example\.com/auth.* with Request body disabled and Response body disabled

In the above case, LiveSession will capture the request from https://example.com/auth/login but the request and response body will be omitted.

Related articles

    Start understanding
    your users today

    Free 14-day trial

    No credit card required

    Easy setup