Source visits

Use it to detect the source of a visit. This specific api call is turned off by default, please contact support@opentracker.net to turn this api call on.

API Usage

This API produces a json array. Use this URL to perform GET or POST requests. Visitors can also be retrieved by source, and/ or a machine_idx.

Parameters

At least one of the following parameters are required:

filterBySource: Find all visitors with specified source (where source's name was passed to opentracker). Default is all sources.
filterByMachineId Display data for these machine ids. Machine id is a unique identifier of each visitor. Default is all machine ids.
filterByVisitId Display data for these visit ids. Visit id is a unique identifier of each visit. Default is all visit ids.
from Find all source visits from the specified unix timestamp. Default is all unix timestamps.
to Find all source visits up to the specified unix timestamp. Default is all unix timestamps.
offset The starting point from where records will display. Default is [0] (most recent chronological event).
limit Maximum number of records to be displayed in the output. The default is [40]. The maximum is 10,000.
login Your opentracker login email. Default is [support@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. Syntax can be found here.

Examples

To search for all visits to www.opentracker.net where the source includes "yahoo":
HTTP GET/ POST: view_source.jsp?login=demo@opentracker.net&password=demo123&site=www.opentracker.net&otsrc=*yahoo*&offset=0&limit=2

Response

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

				




{ "resultsList": [
{
"machine_idx":"867816",
"visit_id":"1123918",
"sourceUnixtime":"1501218299",
"sourceDate":"Jul 28 10:04 AM +0500",
"Source":"ot3",
"Source Cost":"0.0",
"last event":"Jul 28 10:04 AM +0500",
"duration":"05m 41s",
"country":"\/images\/general\/login\/flags\/ca.gif",
"status":"\/images\/general\/login\/puppets\/puppet_offline.png",
"visits(pv)":"1 (7)",
"current page (exit page)":"https:\/\/www.opentracker.net\/products\/web-analytics?otsrc=ot3",
"currentTitle":"Web Analytics | Opentracker Analytics",
"countryName":"Canada",
"city":"Delta",
"region":"British Columbia",
"isp":"",
"org_company":"Unknown",
"isp/ org":"Telus Communications",
"provider":"telus.net",
"area code (tel)":"0",
"ZIP/ postal code":"V4K",
"referrers Logo":"http:\/\/google.ca\/favicon.ico",
"referrer":"google.ca",
"search term":"Unknown",
"user status":"offline",
"number of visits":"1",
"pageviews":"7",
"total pages viewed":"14",
"last visit duration":"05m 41s",
"current visit duration":"00s",
"total duration":"05m 41s",
"first measurement":"Jul 28 09:59 AM +0500",
"platform/ OS":"Intel Mac OS X 10.10.5",
"browser":"Chrome 58.0.3029.110",
"resolution":"1366 x 768",
"IP address":"173.180.153.224"}
]
}


				

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