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 2023-12-11 and display in html:
HTTP GET/ POST:trends_hourly.jsp?trend=hourly&date=2023-12-11&period=4d

Response

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

{ "resultsList": [
{
"No.":"24",
"hour":"23:00 - 23:59 (Mon)",
"visitors":"129",
"returning":"23",
"sessions":"132",
"referred":"91",
"searching":"87",
"pageviews":"303",
"visit time (avg)":"01m 31s",
"first time visitors":"106",
"segment":"",
"single event sessions":"47",
"sessionsWithMoreThanOneEvent":"85"}
,
{
"No.":"23",
"hour":"22:00 - 22:59 (Mon)",
"visitors":"177",
"returning":"37",
"sessions":"180",
"referred":"109",
"searching":"107",
"pageviews":"423",
"visit time (avg)":"01m 47s",
"first time visitors":"140",
"segment":"",
"single event sessions":"74",
"sessionsWithMoreThanOneEvent":"106"}
,
{
"No.":"22",
"hour":"21:00 - 21:59 (Mon)",
"visitors":"181",
"returning":"53",
"sessions":"184",
"referred":"116",
"searching":"114",
"pageviews":"456",
"visit time (avg)":"01m 38s",
"first time visitors":"128",
"segment":"",
"single event sessions":"71",
"sessionsWithMoreThanOneEvent":"113"}
,
{
"No.":"21",
"hour":"20:00 - 20:59 (Mon)",
"visitors":"225",
"returning":"51",
"sessions":"231",
"referred":"155",
"searching":"152",
"pageviews":"584",
"visit time (avg)":"01m 54s",
"first time visitors":"174",
"segment":"",
"single event sessions":"88",
"sessionsWithMoreThanOneEvent":"143"}
,
{
"No.":"20",
"hour":"19:00 - 19:59 (Mon)",
"visitors":"340",
"returning":"60",
"sessions":"346",
"referred":"165",
"searching":"162",
"pageviews":"785",
"visit time (avg)":"02m 28s",
"first time visitors":"280",
"segment":"",
"single event sessions":"187",
"sessionsWithMoreThanOneEvent":"159"}
,
{
"No.":"19",
"hour":"18:00 - 18:59 (Mon)",
"visitors":"262",
"returning":"61",
"sessions":"267",
"referred":"183",
"searching":"175",
"pageviews":"701",
"visit time (avg)":"01m 38s",
"first time visitors":"201",
"segment":"",
"single event sessions":"95",
"sessionsWithMoreThanOneEvent":"172"}
,
{
"No.":"18",
"hour":"17:00 - 17:59 (Mon)",
"visitors":"309",
"returning":"71",
"sessions":"317",
"referred":"204",
"searching":"198",
"pageviews":"738",
"visit time (avg)":"01m 34s",
"first time visitors":"238",
"segment":"",
"single event sessions":"97",
"sessionsWithMoreThanOneEvent":"220"}
,
{
"No.":"17",
"hour":"16:00 - 16:59 (Mon)",
"visitors":"312",
"returning":"62",
"sessions":"316",
"referred":"220",
"searching":"213",
"pageviews":"853",
"visit time (avg)":"02m 15s",
"first time visitors":"250",
"segment":"",
"single event sessions":"107",
"sessionsWithMoreThanOneEvent":"209"}
,
{
"No.":"16",
"hour":"15:00 - 15:59 (Mon)",
"visitors":"315",
"returning":"81",
"sessions":"326",
"referred":"218",
"searching":"208",
"pageviews":"797",
"visit time (avg)":"01m 58s",
"first time visitors":"234",
"segment":"",
"single event sessions":"113",
"sessionsWithMoreThanOneEvent":"213"}
,
{
"No.":"15",
"hour":"14:00 - 14:59 (Mon)",
"visitors":"279",
"returning":"67",
"sessions":"283",
"referred":"160",
"searching":"158",
"pageviews":"689",
"visit time (avg)":"01m 56s",
"first time visitors":"212",
"segment":"",
"single event sessions":"104",
"sessionsWithMoreThanOneEvent":"179"}
,
{
"No.":"14",
"hour":"13:00 - 13:59 (Mon)",
"visitors":"255",
"returning":"82",
"sessions":"257",
"referred":"163",
"searching":"159",
"pageviews":"594",
"visit time (avg)":"01m 25s",
"first time visitors":"173",
"segment":"",
"single event sessions":"92",
"sessionsWithMoreThanOneEvent":"165"}
,
{
"No.":"13",
"hour":"12:00 - 12:59 (Mon)",
"visitors":"276",
"returning":"60",
"sessions":"282",
"referred":"192",
"searching":"183",
"pageviews":"728",
"visit time (avg)":"02m 14s",
"first time visitors":"216",
"segment":"",
"single event sessions":"87",
"sessionsWithMoreThanOneEvent":"195"}
,
{
"No.":"12",
"hour":"11:00 - 11:59 (Mon)",
"visitors":"290",
"returning":"64",
"sessions":"296",
"referred":"189",
"searching":"185",
"pageviews":"794",
"visit time (avg)":"02m 25s",
"first time visitors":"226",
"segment":"",
"single event sessions":"100",
"sessionsWithMoreThanOneEvent":"196"}
,
{
"No.":"11",
"hour":"10:00 - 10:59 (Mon)",
"visitors":"264",
"returning":"65",
"sessions":"268",
"referred":"167",
"searching":"162",
"pageviews":"699",
"visit time (avg)":"01m 59s",
"first time visitors":"199",
"segment":"",
"single event sessions":"92",
"sessionsWithMoreThanOneEvent":"176"}
,
{
"No.":"10",
"hour":"09:00 - 09:59 (Mon)",
"visitors":"264",
"returning":"77",
"sessions":"269",
"referred":"165",
"searching":"162",
"pageviews":"668",
"visit time (avg)":"02m 10s",
"first time visitors":"187",
"segment":"",
"single event sessions":"93",
"sessionsWithMoreThanOneEvent":"176"}
,
{
"No.":"9",
"hour":"08:00 - 08:59 (Mon)",
"visitors":"255",
"returning":"66",
"sessions":"260",
"referred":"149",
"searching":"147",
"pageviews":"625",
"visit time (avg)":"02m 18s",
"first time visitors":"189",
"segment":"",
"single event sessions":"93",
"sessionsWithMoreThanOneEvent":"167"}
,
{
"No.":"8",
"hour":"07:00 - 07:59 (Mon)",
"visitors":"244",
"returning":"72",
"sessions":"253",
"referred":"150",
"searching":"146",
"pageviews":"608",
"visit time (avg)":"01m 53s",
"first time visitors":"172",
"segment":"",
"single event sessions":"94",
"sessionsWithMoreThanOneEvent":"159"}
,
{
"No.":"7",
"hour":"06:00 - 06:59 (Mon)",
"visitors":"226",
"returning":"65",
"sessions":"231",
"referred":"130",
"searching":"126",
"pageviews":"575",
"visit time (avg)":"02m 33s",
"first time visitors":"161",
"segment":"",
"single event sessions":"88",
"sessionsWithMoreThanOneEvent":"143"}
,
{
"No.":"6",
"hour":"05:00 - 05:59 (Mon)",
"visitors":"230",
"returning":"58",
"sessions":"238",
"referred":"138",
"searching":"133",
"pageviews":"598",
"visit time (avg)":"02m 42s",
"first time visitors":"172",
"segment":"",
"single event sessions":"96",
"sessionsWithMoreThanOneEvent":"142"}
,
{
"No.":"5",
"hour":"04:00 - 04:59 (Mon)",
"visitors":"216",
"returning":"53",
"sessions":"220",
"referred":"123",
"searching":"119",
"pageviews":"510",
"visit time (avg)":"02m 27s",
"first time visitors":"163",
"segment":"",
"single event sessions":"103",
"sessionsWithMoreThanOneEvent":"117"}
,
{
"No.":"4",
"hour":"03:00 - 03:59 (Mon)",
"visitors":"167",
"returning":"32",
"sessions":"167",
"referred":"99",
"searching":"97",
"pageviews":"323",
"visit time (avg)":"01m 49s",
"first time visitors":"135",
"segment":"",
"single event sessions":"84",
"sessionsWithMoreThanOneEvent":"83"}
,
{
"No.":"3",
"hour":"02:00 - 02:59 (Mon)",
"visitors":"143",
"returning":"29",
"sessions":"145",
"referred":"98",
"searching":"94",
"pageviews":"344",
"visit time (avg)":"01m 39s",
"first time visitors":"114",
"segment":"",
"single event sessions":"60",
"sessionsWithMoreThanOneEvent":"85"}
,
{
"No.":"2",
"hour":"01:00 - 01:59 (Mon)",
"visitors":"115",
"returning":"15",
"sessions":"117",
"referred":"77",
"searching":"76",
"pageviews":"259",
"visit time (avg)":"01m 55s",
"first time visitors":"100",
"segment":"",
"single event sessions":"47",
"sessionsWithMoreThanOneEvent":"70"}
,
{
"No.":"1",
"hour":"00:00 - 00:59 (Mon)",
"visitors":"126",
"returning":"20",
"sessions":"128",
"referred":"87",
"searching":"86",
"pageviews":"301",
"visit time (avg)":"01m 48s",
"first time visitors":"106",
"segment":"",
"single event sessions":"41",
"sessionsWithMoreThanOneEvent":"87"}
,
{
"No.":"",
"hour":"",
"visitors":"5,600",
"returning":"1,324",
"sessions":"5,713",
"referred":"3,548",
"searching":"3,449",
"pageviews":"13,955",
"visit time (avg)":"0",
"single event sessions":"2,153",
"first time visitors":"4,276",
"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