Trend Pages

Display all website pages visited over a given period of time.

API Usage

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

Parameters

One or more of the following parameters are required:

filterByUrl Calculate the page trend for the specified url. The url should be in the encoded format. Use this link to convert the url to the required format. By default, all the pages are returned.
date Calculate page trends from specified date entered as yyyy-MM-dd. Default is the current date.
unixTime Calculate page trends from specified unix timestamp. Default is current unix timestamp.
period Specify the trend period.

  • d for days, eg: period=14d will show 14rows with daily trends, period=d defaults to 1 day
  • w for weeks, eg: period=12w will show 12 rows with weekly trends, period=w defaults to 1 week
  • m for months, eg: period=4m will show 4 rows with monthly trends, period=m defaults to 1 month

timezone Timezone used. Use this option if more than one timezone is being recorded. Default is site's defined timezone.
limit Maximum number of records to be displayed in the output. The default is [40]. Maximum is 10,000.
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.
site The site for which to display data. 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. A list of locales can be found here.
dataType The dataType parameter determines the format of the data returned. Values can be [ json ] | html | jsondatatable | jsonjqgrid
ignoreLocale Display columns without language translation. Boolean. [false]|true.
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 monthly trends to the website www.opentracker.net for the user "demo@opentracker.net" with password "demo123":
HTTP GET/ POST: trends_pages.jsp?login=demo@opentracker.net&password=demo123&site=www.opentracker.net&trend=monthly

To calculate the weekly trends between the time-range 2010-3-2,20:00 and 2010-3-14,19:59 and display in html:
HTTP GET/ POST: trends_pages.jsp?trend=weekly&from=2010-3-2 20:00&to=2010-3-3 19:59&dataType=html

To calculate the daily trends for the url 'http://www.opentracker.net/de' over a range of 3 days from now:
HTTP GET/ POST: trends_pages.jsp?trend=daily&period=3d

Response

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

{ "resultsList": [
{
"start date":"Feb 04 00:00 AM +0500",
"end date":"Feb 04 23:59 PM +0500",
"startTimestamp":"1328295600",
"endTimestamp":"1328381999",
"url":"http:\/\/www.opentracker.net?otsrc=bing.website_statistics.ad3&clc=0.92",
"visitors":"0",
"visits":"2",
"page views":"2"}
,
{
"start date":"Feb 04 00:00 AM +0500",
"end date":"Feb 04 23:59 PM +0500",
"startTimestamp":"1328295600",
"endTimestamp":"1328381999",
"url":"http:\/\/www.opentracker.net?otsrc=bing.page_counter.ad1&clc=0.92",
"visitors":"0",
"visits":"1",
"page views":"1"}
,


...

,
{
"start date":"Feb 04 00:00 AM +0500",
"end date":"Feb 04 23:59 PM +0500",
"startTimestamp":"1328295600",
"endTimestamp":"1328381999",
"url":"http:\/\/reporting.texterity.com\/login\/top_lists\/top_pages.jsp?sday=20110501&eday=20110701&d=20110701&p=custom",
"visitors":"0",
"visits":"1",
"page views":"1"}
,
{
"start date":"Feb 04 00:00 AM +0500",
"end date":"Feb 04 23:59 PM +0500",
"startTimestamp":"1328295600",
"endTimestamp":"1328381999",
"url":"http:\/\/reporting.texterity.com\/login\/top_lists\/top_pages.jsp?sday=20110701&eday=20110831&d=20110831&p=custom",
"visitors":"0",
"visits":"1",
"page views":"2"}
,
{
"start date":"Feb 04 00:00 AM +0500",
"end date":"Feb 04 23:59 PM +0500",
"startTimestamp":"1328295600",
"endTimestamp":"1328381999",
"url":"http:\/\/reporting.texterity.com\/login\/top_lists\/top_pages.jsp?sday=20110901&eday=20111031&d=20111031&p=custom",
"visitors":"0",
"visits":"1",
"page views":"2"}
]
}

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