Resources

A resource event corresponds to a resource or asset fetch on a webpage such as an image, XHR, Fetch, CSS, or JS library. A resource is a child event to an action event. It also has the context of the view that is currently active.

The following properties may be used to analyze and profile resources in a session:-

Property

Description

Example

Usage

Property

Description

Example

Usage

duration

overall time spent fetching the resource

48ms

Analytics can be performed to get the slowest loading resources

resource.size

Resource size

912B

Analytics can be performed to see the size distribution of the resources

resource.connect.duration

Time to establish connection to resource server

20ms

Insight into users' reachability of resource

resource.ssl.duration

TLS handshake time for HTTPS connections

15ms

Diagnose whether problem lies with the user’s network

resource.dns.duration

DNS resolution time

23ms

Diagnose whether problem lies with the user’s network

resource.redirect.duration

time spent on downstream HTTPS requests

30ms

Redirect analytics or filtering

resource.first_byte.duration

waiting time to receive the first byte of the resource

30ms

Can be used to find out the rate determining resource in a view

resource.download.duration

Response download time

24ms

Analytics can be performed to determine if the storage solution for the resource is slow

resource.type

Type of resource being fetched

javascript, css

filter analytics based on resource type

resource.method

HTTP method

POST

 

resource.status_code

Response code

202

 

resource.url

URL of the resource being fetched

 

 

resource.url_host

URL host

 

 

resource.url_path

URL path

 

 

resource.url_query

URL query parameters

 

 

resource.url_scheme

Protocol type

HTTP, HTTPS

 

resource.provider.name

resource provider name

 

 

resource.provider.domain

resource domain

 

 

resource.provider.type

The type of content provider

cdn, first-party