Your data. Anywhere you go.

New Relic for iOS or Android


Download on the App Store    Android App on Google play


New Relic Insights App for iOS


Download on the App Store


Learn more

Close icon

Relic Solution: Insights Dashboard for Browser: Part 1 - Users

browser
insights
levelup

#1

Introduction

Want to create an awesome dashboard with your Browser data? Where you can view the most popular pages or know what is the busiest time for traffic. With this Level Up post, I will provide the steps to achieve this.

This dashboard will have a FACET widget where you can link the items in that widget to a pre-filtered dashboard of information relevant to just that facet, or filter the results of your existing dashboard.

Prerequisites


Dashboard Details

Required Products: APM
Level of Effort: Low
This dashboard will work on the standard New Relic data models and does not require any custom attributes or events.

Settings
Use the gear button to edit your dashboard and configure the following settings:

  • Dashboard Filter: Enabled
  • Enabled Event Types: PageViews
  • Enabled Attributes: all

Queries

In this section, we’ll go into the details on the purpose of each of the charts. We’ll also show you the query (NRQL) that you can cut/paste into your Insights query bar.

Total Recent Page Views

SELECT count(*) FROM PageView since 1 day ago FACET  appName

Recent Average Response Time"

SELECT average(duration) FROM PageView  since 1 day ago  FACET appName TIMESERIES

Recent End User & App Server Performance

SELECT average(duration) as ' End User Time', average(backendDuration) as ' App Server Time ' FROM PageView SINCE 1 day ago  TIMESERIES

Weekly Page Views By Day

SELECT count(*) FROM PageView FACET weekDayOf(timestamp)  since 7 day ago  limit 7

Daily Page Views By Hour

SELECT count(*) FROM PageView FACET hourof(timestamp) SINCE 24 hours ago

Most Frequently Viewed Pages

SELECT count(*) FROM PageView since 1 days ago FACET pageUrl limit 25

Slowest Page Load Times

SELECT average(duration) FROM PageView since 1 day ago FACET pageUrl TIMESERIES AUTO

Slowest Pages

SELECT average(duration) from PageView since 7 day ago FACET pageUrl

Page Load Time - Histogram

SELECT histogram(duration, 10, 30) FROM PageView SINCE 1 day ago

Customers by Country

SELECT count(*) FROM PageView SINCE 1 day ago FACET countryCode

What Cities Are My Users In?

SELECT count(*) FROM PageView since 1 day ago FACET  city

Browser and OS Usage

SELECT count(*) FROM PageView since 1 days ago facet userAgentName, userAgentOS

Browser Usage %'s

SELECT percentage(uniqueCount(session), WHERE userAgentName = 'IE') AS '% of IE Users', percentage(uniqueCount(session), WHERE userAgentName = 'Chrome') AS '% of Chrome Users', percentage(uniqueCount(session), WHERE userAgentName = 'Firefox') AS '% of Firefox Users', percentage(uniqueCount(session), WHERE userAgentName = 'Safari') AS '% of Safari Users' FROM PageView SINCE 1 day ago

Slowest ASN’s

SELECT average(duration) FROM PageView FACET asnOrganization SINCE 1 day ago

Extra Credit - Share your dashboard with the community!

Want to be a super “NeRD” (New Relic Developer)?
Use the API Explorer to create our Dashboard. Then share your dashboard below and increase your international NeRD cred! (And you’ll earn a cool badge for your community profile!) Here are some quick tips on how to do this.

  1. Copy the Dashboard json below and click here
  2. Paste the JSON into the dashboard textbox with your Admin API key

User%20Dashboard

Once the parameters are filled in, click Send Request, you should receive a 200 OK response.

  1. Go to Insights Dashboards and search for the ` Browser Users Dashboard’.

Dashboard Definition

{
  "dashboard": {
    "id": 673054,
    "title": "Browser Users Dashboard",
    "description": null,
    "icon": "users",
    "visibility": "all",
    "editable": "editable_by_all",
    "metadata": {
      "version": 1
    },
    "widgets": [
      {
        "visualization": "facet_pie_chart",
        "layout": {
          "width": 1,
          "height": 1,
          "row": 1,
          "column": 1
        },
        "widget_id": 6162472,
        "data": [
          {
            "nrql": "SELECT count(*) FROM PageView since 1 day ago FACET  appName"
          }
        ],
        "presentation": {
          "title": "Total Recent Page Views",
          "notes": null,
          "drilldown_dashboard_id": 673054
        }
      },
      {
        "visualization": "faceted_area_chart",
        "layout": {
          "width": 1,
          "height": 1,
          "row": 1,
          "column": 2
        },
        "widget_id": 6287540,
        "data": [
          {
            "nrql": "SELECT average(duration) FROM PageView  since 1 day ago  FACET appName TIMESERIES"
          }
        ],
        "presentation": {
          "title": "Recent Average Response Time",
          "notes": null
        }
      },
      {
        "visualization": "line_chart",
        "layout": {
          "width": 1,
          "height": 1,
          "row": 1,
          "column": 3
        },
        "widget_id": 6287542,
        "data": [
          {
            "nrql": "SELECT average(duration) as ' End User Time', average(backendDuration) as ' App Server Time ' FROM PageView SINCE 1 day ago  TIMESERIES"
          }
        ],
        "presentation": {
          "title": "Recent End User & App Server Performance",
          "notes": null
        }
      },
      {
        "visualization": "facet_bar_chart",
        "layout": {
          "width": 1,
          "height": 1,
          "row": 2,
          "column": 1
        },
        "widget_id": 6287560,
        "data": [
          {
            "nrql": "SELECT count(*) FROM PageView FACET weekDayOf(timestamp)  since 7 day ago  limit 7"
          }
        ],
        "presentation": {
          "title": "Weekly Page Views By Day",
          "notes": null,
          "drilldown_dashboard_id": 673054
        }
      },
      {
        "visualization": "facet_pie_chart",
        "layout": {
          "width": 1,
          "height": 1,
          "row": 2,
          "column": 2
        },
        "widget_id": 6287641,
        "data": [
          {
            "nrql": "SELECT count(*) FROM PageView FACET hourof(timestamp) SINCE 24 hours ago"
          }
        ],
        "presentation": {
          "title": "Daily Page Views By Hour",
          "notes": null,
          "drilldown_dashboard_id": 673054
        }
      },
      {
        "visualization": "facet_bar_chart",
        "layout": {
          "width": 1,
          "height": 1,
          "row": 2,
          "column": 3
        },
        "widget_id": 6287654,
        "data": [
          {
            "nrql": "SELECT count(*) FROM PageView since 1 days ago FACET pageUrl limit 25"
          }
        ],
        "presentation": {
          "title": "Most Frequently Viewed Pages",
          "notes": null,
          "drilldown_dashboard_id": 673054
        }
      },
      {
        "visualization": "faceted_line_chart",
        "layout": {
          "width": 1,
          "height": 1,
          "row": 3,
          "column": 1
        },
        "widget_id": 6162477,
        "data": [
          {
            "nrql": "SELECT average(duration) FROM PageView since 1 day ago FACET pageUrl TIMESERIES AUTO"
          }
        ],
        "presentation": {
          "title": "Slowest Page Load Times",
          "notes": null
        }
      },
      {
        "visualization": "facet_bar_chart",
        "layout": {
          "width": 1,
          "height": 1,
          "row": 3,
          "column": 2
        },
        "widget_id": 6210250,
        "data": [
          {
            "nrql": "SELECT average(duration) from PageView since 7 day ago FACET pageUrl"
          }
        ],
        "presentation": {
          "title": "Slowest Pages",
          "notes": null,
          "drilldown_dashboard_id": 673054
        }
      },
      {
        "visualization": "histogram",
        "layout": {
          "width": 1,
          "height": 1,
          "row": 3,
          "column": 3
        },
        "widget_id": 6287734,
        "data": [
          {
            "nrql": "SELECT histogram(duration, 10, 30) FROM PageView SINCE 1 day ago"
          }
        ],
        "presentation": {
          "title": "Page Load Time - Histogram",
          "notes": null
        }
      },
      {
        "visualization": "facet_bar_chart",
        "layout": {
          "width": 1,
          "height": 1,
          "row": 4,
          "column": 1
        },
        "widget_id": 6162469,
        "data": [
          {
            "nrql": "SELECT count(*) FROM PageView SINCE 1 day ago FACET countryCode"
          }
        ],
        "presentation": {
          "title": "Customers by Country",
          "notes": null,
          "drilldown_dashboard_id": 673054
        }
      },
      {
        "visualization": "facet_bar_chart",
        "layout": {
          "width": 1,
          "height": 1,
          "row": 4,
          "column": 2
        },
        "widget_id": 6162471,
        "data": [
          {
            "nrql": "SELECT count(*) FROM PageView since 1 day ago FACET  city"
          }
        ],
        "presentation": {
          "title": "What Cities Are My Users In?",
          "notes": null,
          "drilldown_dashboard_id": 673054
        }
      },
      {
        "visualization": "facet_pie_chart",
        "layout": {
          "width": 1,
          "height": 1,
          "row": 4,
          "column": 3
        },
        "widget_id": 6287762,
        "data": [
          {
            "nrql": "SELECT count(*) FROM PageView since 1 days ago facet userAgentName, userAgentOS"
          }
        ],
        "presentation": {
          "title": "Browser and OS Usage",
          "notes": null,
          "drilldown_dashboard_id": null
        }
      },
      {
        "visualization": "attribute_sheet",
        "layout": {
          "width": 2,
          "height": 1,
          "row": 5,
          "column": 1
        },
        "widget_id": 6207798,
        "data": [
          {
            "nrql": "SELECT percentage(uniqueCount(session), WHERE userAgentName = 'IE') AS '% of IE Users', percentage(uniqueCount(session), WHERE userAgentName = 'Chrome') AS '% of Chrome Users', percentage(uniqueCount(session), WHERE userAgentName = 'Firefox') AS '% of Firefox Users', percentage(uniqueCount(session), WHERE userAgentName = 'Safari') AS '% of Safari Users' FROM PageView SINCE 1 day ago"
          }
        ],
        "presentation": {
          "title": "Browser Usage %'s",
          "notes": null
        }
      },
      {
        "visualization": "facet_bar_chart",
        "layout": {
          "width": 1,
          "height": 1,
          "row": 5,
          "column": 3
        },
        "widget_id": 6207389,
        "data": [
          {
            "nrql": "SELECT average(duration) FROM PageView FACET asnOrganization SINCE 1 day ago"
          }
        ],
        "presentation": {
          "title": "Slowest ASN's",
          "notes": null,
          "drilldown_dashboard_id": 673054
        }
      }
    ],
    "filter": {
      "event_types": [
        "PageView"
      ],
      "attributes": []
    }
  }
}

=

More information

Check out our Help Centre for more information on the topics in this post:


What’s next?

Part 2 Dashboard for JS Errors
Part 3 Dashboard for Ajax Requests


Relic Solution: Insights Dashboard for Browser: Part 2 - JS Errors
Explorers Hub Treasure Hunt
Best Practice Guide: Browser
Relic Solution: Insights Dashboard for Browser: Part 3 - Ajax Request