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

How to find peak hour of most users visiting a website

browser

#1

Hi,
For querying data from Browser, i need to find daily peak hours during which i find most users visiting website. For ex. between 1pm-3pm or 3pm to 6pm brackets.
I tried,

SELECT count(*) FROM PageView WHERE appName = ‘**’ FACET hourOf(timestamp) SINCE this month

Its not quite what i want. Thanks


#2

Hi,
If we can have the data from 15 Nov to 15 Dec to have a view of peak and lean times during the day for the browser application that’ll really be helpful. Thanks.


#3

Hi @Mohd.Salman2 - The NRQL Library has many samples which you can use to put this query together :wink:


#4

Hi Stefan,
I have checked the library and i have progressed although the result is not the correct format. I tried:

SELECT count(*) FROM PageView WHERE appName = ‘**’ FACET hourOf(timestamp ) SINCE this year LIMIT 5

The result is not sorted according to pageviews, i want most page views on top wrt the hour based timestamp. Thanks, let me know if this is possible.


#5

You can try adding ORDER BY pageUrl but this may not work as the ORDER BY clause is not supported. Alternatively, you will need to manually set the sort by clicking the column header on the table.


#6

Thanks much. So the below query gives me the peak hours from 15 Nov to 15 Dec to during the day for the application. The pageviews can be taken as a parameter for traffic as a practice?


#7

Hi, @Mohd.Salman2: It depends what you want to measure. If you want to measure page views, the above query will work. If you want to measure sessions (app launches), you can try:

SELECT uniqueCount(session)
FROM PageView...

If you want to measure users, you will have to capture a custom attribute with a unique ID for each user.


#8

Thanks @philweber @stefan_garnham


#9

This is great stuff from @philweber and @stefan_garnham

Let us know how these queries go for you @Mohd.Salman2