Searching visits

Display all searching visits (originating through search engine and/or with search term). 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. Utilize this URL to perform GET or POST requests. Visits can also be retrieved based on a visit_id, and/ or a machine_idx.

Parameters

One or more of the following parameters are required:

filterBySearch: Find all visits searching the specified search term. The default is all search terms.
filterByMachineId Display data for these machine ids. Machine id is a unique identifier of each visitor. The default is all machine ids.
filterByVisitId Display data for these visit ids. Visit id is a unique identifier of each visit. The default is all visit ids.
from Find all visits from the specified unix timestamp. Default is all unix timestamps.
to Find all visits up to the specified unix timestamp. Default is all unix timestamps.
offset The starting point from where the records are to be displayed. Default is [0] (most recent chronological event).
limit Maximum number of records to be displayed in the output. Default is [40]. 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.

ignoreLocale Display columns without language translation. Boolean. [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.
timezone The timeZone is the parameter to display the dates in EST | CST | PST | CET | JST | GMT | etc. A list of timeZones can be found here.

Examples

To get the latest 10 visits of all the users whose first visit was through a search in the website www.opentracker.net for the user "support@opentracker.net" with password "xxxxxx":
HTTP GET/ POST: view_visits_searches.jsp?login=demo@opentracker.net&password=demo123&site=www.opentracker.net&offset=0&limit=2

Response

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










{ "resultsList": [
{
"visit_id":"1098916",
"machine_idx":"847675",
"last event":"Jun 25 08:05 AM +0500",
"duration":"s.e.",
"flag":"de",
"status":"puppet_offline",
"visits(pv)":"1 (1)",
"search term":"open tracker",
"referrers: links leading visitors to your site":"bing.com",
"referrer url":"http:\/\/www.bing.com\/searc...4BFDA5BF3F14FAF60B7C",
"raw referrer url":"http:\/\/www.bing.com\/search?q=open tracker&qs=n&form=QBRE&sp=-1&pq=open tracker&sc=8-8&sk=&cvid=86B5A8CD9C6D4BFDA5BF3F14FAF60B7C",
"entry page (landing page)":"http:\/\/www.opentracker.net\/de",
"entry title":"Opentracker - Web & App Analytics, Lead Capture & Big Data",
"countryName":"Germany",
"city":"Prackenbach",
"region":"Bayern",
"isp":"Unknown",
"company/ org":"Unknown",
"isp/ org":"Deutsche Telekom Ag",
"provider":"t-ipconnect.de",
"area code (tel)":"0",
"ZIP/ postal code":"94267",
"referrers Logo":"http:\/\/bing.com\/favicon.ico",
"referrer":"bing.com",
"search term":"open tracker",
"user status":"offline",
"number of visits":"1",
"pageviews":"1",
"total pages viewed":"2",
"last visit duration":"single event( s.e.)",
"current visit duration":"00s",
"total duration":"00s",
"first measurement":"Jun 25 08:05 AM +0500",
"platform/ OS":"Windows NT 10.0",
"browser":"Firefox 54.0",
"resolution":"1920 x 1080",
"IP address":"93.239.238.74",
"country code (FIPS 10-4)":"gm"}
,
{
"visit_id":"1098764",
"machine_idx":"847561",
"last event":"Jun 24 23:08 PM +0500",
"duration":"s.e.",
"flag":"us",
"status":"puppet_offline",
"visits(pv)":"1 (1)",
"search term":"opentracker",
"referrers: links leading visitors to your site":"google.com.tr",
"referrer url":"https:\/\/www.google.com.tr...1j0i67k1.1QM9-ti_mSY",
"raw referrer url":"https:\/\/www.google.com.tr\/search?client=ucweb-b&channel=sb&ei=eqhOWcLiMMuwUYTdrcAP&q=opentracker&oq=open trac&gs_l=mobile-gws-serp.1.0.0i10k1j0l4.519260.526388.0.527872.17.12.0.1.1.0.246.2327.0j3j8.11.0....0...1.1.64.mobile-gws-serp..7.10.1998.3..41j0i131k1j0i67k1.1QM9-ti_mSY",
"entry page (landing page)":"http:\/\/www.opentracker.net",
"entry title":"Opentracker - Web & App Analytics, Lead Capture & Big Data",
"countryName":"United States",
"city":"Pasadena",
"region":"California",
"isp":"Unknown",
"company/ org":"Unknown",
"isp/ org":"Quantil",
"provider":"Unknown",
"area code (tel)":"626",
"ZIP/ postal code":"91101",
"referrers Logo":"http:\/\/google.com.tr\/favicon.ico",
"referrer":"google.com.tr",
"search term":"opentracker",
"user status":"offline",
"number of visits":"1",
"pageviews":"1",
"total pages viewed":"2",
"last visit duration":"single event( s.e.)",
"current visit duration":"00s",
"total duration":"00s",
"first measurement":"Jun 24 23:08 PM +0500",
"platform/ OS":"Android",
"browser":"Android browser 4.0",
"resolution":"1920 x 1080",
"IP address":"168.235.200.187",
"country code (FIPS 10-4)":"us"}
]
}


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

-------------

(*term*) not available

term* available

*term if reverse index (extra work)

term* || term2* -> extra work merging
term* && term2* -> needs to be indexed(?) extra work


** important ** .. (subset of session table, sessions with terms in it) i'm looking for the last 40 (limit) visits of people who are visiting with any search term ordered by date

** not important ** usecase0a: ... i'm looking for the last 40 (limit) visits of people who are visiting with a search term alphabetically ordered


buckets are used for recency, so that if a key has changing properties in time the bucket can solve this problem. buckets are ordered by date.

** important ** ..  I want to search everyone with first* -> list' of sessions with first*
strat 1: ** important ** .., ..  I want to search everyone with first*, ordered by date -> list' of sessions with first* 
doesnt solve strat 2: ** important ** . { secondary column . } I want to search everyone with first*, ordered by date -> list' of sessions with first* (might be memory problem unsolvable)

doesnt solve strat 2: ** important ** .. { secondary column . } I want to search everyone with first*, ordered by date -> list' of sessions with first* (you cant search on  -> so you cant search on the secondary column)....

hard to solve:



** important ** .- (subset of session table, sessions with first term in it) i'm looking for the last 40 (limit) visits of people who have search term: term* ordered by date

select * from sessions where ipnumber between x and y order by date; (using filesort)
get * from .- cf where search term: term* -> list[10,000]; [list ordered by value .] garanteed < 10,000;

memory / key.column value size  = number in list (/2 safety factor).

-> put into cassandra  .


-> select from cassandra list limit 10,000;



-----------------
list' = mechanism that guarantees no memory overload with large lists. So we have a java list that has no memory contraints.
if the list is 10,000 but you get 1000, you'll miss the most recent. (maybe with a bucketing system you can solve this) 
-----------------


-------------
usecase1: i'm looking for a machine id's search visits -> . || get all visits for the machine id and elimenate the non search visits 
usecase2: i'm looking for a machine id's search visits one year ago -> one index ->  get all visits for the machine id and elimenate the non search visits and within time period

-------------
-------------
usecase3: i'm looking for a searched visit_id for a site -> one index . || use session cf and flag on condition its a searcg visit. (deprecate)
-------------
-------------
usecase4: i'm looking for a machine_id with this visit_id -> not available query
-------------
-------------
or deprecate offset, and just use next tokens. so implement a next token.
offset: we just iterate through. eg offset = 300, limit = 100 -> we need to iterate through first 301 keys, and use 301 - 400, preferably no memory problems = memory / key size = iteration size. 
-------------

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