Hourly Trends

Display and analyse hourly trends in website traffic through time.

Display and analyse hourly trends in website traffic through time.

API Usage

This API produces a json array. Use this URL to perform GET or POST requests.

Parameters

At least one of the following parameters are required:

date Calculate hourly trends from specified date entered as yyyy-MM-dd. Default is the current date.
unixTime Calculate hourly trends from specified unix timestamp. Default is current unix timestamp.
period Specify the trend period. Default is the 24 hours of the specified date

    • "x"h for hours, eg: period=6h will show 6 rows with hourly trends
    • "x"d for number of hours in x days, eg: period=2d will show 48 rows with hourly trends (24 hours for each day X 2)

timezone The timezone used. Use this option if more than one timezone is being recorded, by default the site's defined timezone is used.
login Your opentracker login email. Default is [demo@opentracker.net].
password Your password.
ticketId A ticketId can be used to provide credentials with an expiring token. A ticketId can be used instead of a login/ password combination. Further information can be found here.
segment This is the property field based on which you want to segment the data. By default there are no segments. You can find more information here.
filter You can choose to see no segments [none] (default), see all segments showAllSorts, or by specifying the name of the segment.
site The site for which to display data. The default is [www.opentracker.net].
locale The locale parameter is an identifier for a particular combination of language and region (e.g. en_US) and determines the format of the data returned. Default is [en_US]. A list of locales can be found here.

ignoreLocale Display columns without language translation. [false]|true.
dataType The dataType parameter determines the format of the data returned. Values can be [ json ] | html | jsondatatable | jsonjqgrid
dateFormat The dateFormat parameter determines the format of dates returned. An example is dateFormat=yyyy-dd-MM. The syntax can be found here.

Examples

To calculate the hourly trends of today to the website www.opentracker.net for the user "demo@opentracker.net" with password "demo123":
HTTP GET/ POST: trends_hourly.jsp?login=demo@opentracker.net&password=demo123&site=www.opentracker.net&trend=hourly

To calculate the hourly trends between the time-range of 4 days from 2010-3-2 and display in html:
HTTP GET/ POST:trends_hourly.jsp?trend=hourly&date=2010-3-2&period=4d

Response

This last example returns a json array with 'n' entries starting from the specified offset formatted as:

{ "resultsList": [
{
"No.":"24",
"hour":"23:00 - 23:59 (Mon)",
"visitors":"50",
"returning":"4",
"sessions":"51",
"referred":"38",
"searching":"34",
"pageviews":"79",
"visit time (avg)":"02m 55s",
"first time visitors":"46",
"segment":"",
"single event sessions":"37",
"sessionsWithMoreThanOneEvent":"14"}
,
{
"No.":"23",
"hour":"22:00 - 22:59 (Mon)",
"visitors":"58",
"returning":"11",
"sessions":"62",
"referred":"47",
"searching":"39",
"pageviews":"90",
"visit time (avg)":"01m 25s",
"first time visitors":"47",
"segment":"",
"single event sessions":"46",
"sessionsWithMoreThanOneEvent":"16"}
,
{
"No.":"22",
"hour":"21:00 - 21:59 (Mon)",
"visitors":"57",
"returning":"12",
"sessions":"59",
"referred":"42",
"searching":"36",
"pageviews":"86",
"visit time (avg)":"02m 42s",
"first time visitors":"45",
"segment":"",
"single event sessions":"42",
"sessionsWithMoreThanOneEvent":"17"}
,
{
"No.":"21",
"hour":"20:00 - 20:59 (Mon)",
"visitors":"57",
"returning":"4",
"sessions":"57",
"referred":"45",
"searching":"42",
"pageviews":"79",
"visit time (avg)":"02m 42s",
"first time visitors":"53",
"segment":"",
"single event sessions":"46",
"sessionsWithMoreThanOneEvent":"11"}
,
{
"No.":"20",
"hour":"19:00 - 19:59 (Mon)",
"visitors":"50",
"returning":"7",
"sessions":"49",
"referred":"35",
"searching":"33",
"pageviews":"62",
"visit time (avg)":"02m 26s",
"first time visitors":"43",
"segment":"",
"single event sessions":"40",
"sessionsWithMoreThanOneEvent":"9"}
,
{
"No.":"19",
"hour":"18:00 - 18:59 (Mon)",
"visitors":"53",
"returning":"10",
"sessions":"55",
"referred":"38",
"searching":"38",
"pageviews":"75",
"visit time (avg)":"01m 29s",
"first time visitors":"43",
"segment":"",
"single event sessions":"40",
"sessionsWithMoreThanOneEvent":"15"}
,
{
"No.":"18",
"hour":"17:00 - 17:59 (Mon)",
"visitors":"60",
"returning":"8",
"sessions":"62",
"referred":"51",
"searching":"49",
"pageviews":"89",
"visit time (avg)":"01m 52s",
"first time visitors":"52",
"segment":"",
"single event sessions":"49",
"sessionsWithMoreThanOneEvent":"13"}
,
{
"No.":"17",
"hour":"16:00 - 16:59 (Mon)",
"visitors":"85",
"returning":"16",
"sessions":"86",
"referred":"70",
"searching":"62",
"pageviews":"116",
"visit time (avg)":"01m 13s",
"first time visitors":"69",
"segment":"",
"single event sessions":"70",
"sessionsWithMoreThanOneEvent":"16"}
,
{
"No.":"16",
"hour":"15:00 - 15:59 (Mon)",
"visitors":"64",
"returning":"12",
"sessions":"64",
"referred":"46",
"searching":"43",
"pageviews":"86",
"visit time (avg)":"03m 10s",
"first time visitors":"52",
"segment":"",
"single event sessions":"51",
"sessionsWithMoreThanOneEvent":"13"}
,
{
"No.":"15",
"hour":"14:00 - 14:59 (Mon)",
"visitors":"47",
"returning":"11",
"sessions":"47",
"referred":"37",
"searching":"33",
"pageviews":"63",
"visit time (avg)":"02m 38s",
"first time visitors":"36",
"segment":"",
"single event sessions":"39",
"sessionsWithMoreThanOneEvent":"8"}
,
{
"No.":"14",
"hour":"13:00 - 13:59 (Mon)",
"visitors":"61",
"returning":"10",
"sessions":"62",
"referred":"43",
"searching":"37",
"pageviews":"85",
"visit time (avg)":"03m 08s",
"first time visitors":"51",
"segment":"",
"single event sessions":"48",
"sessionsWithMoreThanOneEvent":"14"}
,
{
"No.":"13",
"hour":"12:00 - 12:59 (Mon)",
"visitors":"47",
"returning":"1",
"sessions":"48",
"referred":"41",
"searching":"36",
"pageviews":"61",
"visit time (avg)":"01m 07s",
"first time visitors":"46",
"segment":"",
"single event sessions":"41",
"sessionsWithMoreThanOneEvent":"7"}
,
{
"No.":"12",
"hour":"11:00 - 11:59 (Mon)",
"visitors":"57",
"returning":"8",
"sessions":"57",
"referred":"45",
"searching":"40",
"pageviews":"83",
"visit time (avg)":"01m 21s",
"first time visitors":"49",
"segment":"",
"single event sessions":"39",
"sessionsWithMoreThanOneEvent":"18"}
,
{
"No.":"11",
"hour":"10:00 - 10:59 (Mon)",
"visitors":"40",
"returning":"5",
"sessions":"40",
"referred":"31",
"searching":"27",
"pageviews":"64",
"visit time (avg)":"02m 51s",
"first time visitors":"35",
"segment":"",
"single event sessions":"27",
"sessionsWithMoreThanOneEvent":"13"}
,
{
"No.":"10",
"hour":"09:00 - 09:59 (Mon)",
"visitors":"50",
"returning":"8",
"sessions":"49",
"referred":"32",
"searching":"30",
"pageviews":"63",
"visit time (avg)":"02m 08s",
"first time visitors":"42",
"segment":"",
"single event sessions":"40",
"sessionsWithMoreThanOneEvent":"9"}
,
{
"No.":"9",
"hour":"08:00 - 08:59 (Mon)",
"visitors":"35",
"returning":"5",
"sessions":"36",
"referred":"28",
"searching":"22",
"pageviews":"41",
"visit time (avg)":"02m 18s",
"first time visitors":"30",
"segment":"",
"single event sessions":"32",
"sessionsWithMoreThanOneEvent":"4"}
,
{
"No.":"8",
"hour":"07:00 - 07:59 (Mon)",
"visitors":"36",
"returning":"3",
"sessions":"36",
"referred":"30",
"searching":"28",
"pageviews":"51",
"visit time (avg)":"02m 10s",
"first time visitors":"33",
"segment":"",
"single event sessions":"31",
"sessionsWithMoreThanOneEvent":"5"}
,
{
"No.":"7",
"hour":"06:00 - 06:59 (Mon)",
"visitors":"34",
"returning":"5",
"sessions":"34",
"referred":"26",
"searching":"26",
"pageviews":"55",
"visit time (avg)":"57s",
"first time visitors":"29",
"segment":"",
"single event sessions":"26",
"sessionsWithMoreThanOneEvent":"8"}
,
{
"No.":"6",
"hour":"05:00 - 05:59 (Mon)",
"visitors":"29",
"returning":"3",
"sessions":"29",
"referred":"23",
"searching":"23",
"pageviews":"41",
"visit time (avg)":"01m 27s",
"first time visitors":"26",
"segment":"",
"single event sessions":"20",
"sessionsWithMoreThanOneEvent":"9"}
,
{
"No.":"5",
"hour":"04:00 - 04:59 (Mon)",
"visitors":"28",
"returning":"3",
"sessions":"29",
"referred":"24",
"searching":"22",
"pageviews":"37",
"visit time (avg)":"02m 12s",
"first time visitors":"25",
"segment":"",
"single event sessions":"26",
"sessionsWithMoreThanOneEvent":"3"}
,
{
"No.":"4",
"hour":"03:00 - 03:59 (Mon)",
"visitors":"37",
"returning":"4",
"sessions":"37",
"referred":"32",
"searching":"31",
"pageviews":"48",
"visit time (avg)":"30s",
"first time visitors":"33",
"segment":"",
"single event sessions":"31",
"sessionsWithMoreThanOneEvent":"6"}
,
{
"No.":"3",
"hour":"02:00 - 02:59 (Mon)",
"visitors":"43",
"returning":"7",
"sessions":"44",
"referred":"34",
"searching":"30",
"pageviews":"69",
"visit time (avg)":"03m 50s",
"first time visitors":"36",
"segment":"",
"single event sessions":"32",
"sessionsWithMoreThanOneEvent":"12"}
,
{
"No.":"2",
"hour":"01:00 - 01:59 (Mon)",
"visitors":"37",
"returning":"5",
"sessions":"37",
"referred":"30",
"searching":"26",
"pageviews":"54",
"visit time (avg)":"03m 46s",
"first time visitors":"32",
"segment":"",
"single event sessions":"27",
"sessionsWithMoreThanOneEvent":"10"}
,
{
"No.":"1",
"hour":"00:00 - 00:59 (Mon)",
"visitors":"25",
"returning":"3",
"sessions":"25",
"referred":"22",
"searching":"21",
"pageviews":"50",
"visit time (avg)":"08m 41s",
"first time visitors":"22",
"segment":"",
"single event sessions":"18",
"sessionsWithMoreThanOneEvent":"7"}
,
{
"No.":"",
"hour":"",
"visitors":"1,140",
"returning":"165",
"sessions":"1,155",
"referred":"890",
"searching":"808",
"pageviews":"1,627",
"visit time (avg)":"0",
"single event sessions":"898",
"first time visitors":"975",
"segment":"",
"sessionsWithMoreThanOneEvent":""}
]
}

Errors

If errors are encountered, the first encountered error will be returned of form "Error: exception: message

Error: java.lang.RuntimeException: Login/ site combination is not valid

We would love to hear your feedback. Please use the facebook comment box below