First time visits

View all one-time visits (within a 24 hour period). 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. 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:

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 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 which records will display. Default is [0] (most recent chronological event).
limit The maximum number of records to be displayed in the output. Default is [40]. The 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. Default is [demo123]
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. 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 search for all first time visitors browsing www.opentracker.net:
HTTP GET/ POST: view_visits_firsttime.jsp?login=demo@opentracker.net&password=demo123&site=www.opentracker.net&offset=0&limit=10
To search for first visits of a user with the machine id 1234567:
HTTP GET/ POST:view_visits_firsttime.jsp?filterByMachineId=1234567

Response

This page returns a json array with 'n' entries formatted as:

				{ "resultsList": [
{
"error":"java.lang.NullPointerException\\n\\tat org.apache.jsp.api.views.view_005fvisits_005ffirsttime_jsp._jspService(view_005fvisits_005ffirsttime_jsp.java:911)\\n\\tat org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)\\n\\tat javax.servlet.http.HttpServlet.service(HttpServlet.java:717)\\n\\tat org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:377)\\n\\tat org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)\\n\\tat org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)\\n\\tat javax.servlet.http.HttpServlet.service(HttpServlet.java:717)\\n\\tat org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)\\n\\tat org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)\\n\\tat org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:176)\\n\\tat org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:145)\\n\\tat org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:92)\\n\\tat org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:394)\\n\\tat org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)\\n\\tat org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)\\n\\tat org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)\\n\\tat org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)\\n\\tat org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)\\n\\tat org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)\\n\\tat org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:555)\\n\\tat org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)\\n\\tat org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)\\n\\tat org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:857)\\n\\tat org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)\\n\\tat org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)\\n\\tat java.lang.Thread.run(Thread.java:745)\\n"}
]
}


				

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

-------------
usecase0: i'm looking for the last 40 (limit) visits of people who are visiting for the first (the first session is < 24 hours ago) -> one index (session table) -> . -> last 40 sessions * bucket issue needs to be addressed, buckets are indexing the session cf (table).
-------------
-------------
usecase1: i'm looking for a machine id's visits always for a site 40 (limit) -> one index -> .123142.* @-> x sessions (no bucket issue, immediately get from sessions cf (table)).
usecase2: i'm looking for a machine id's visits one year ago -> one index -> .1234341.2009* @-> sessions
-------------
-------------
usecase3: i'm looking for a visit_id for a site -> one index -> .123142 -> session column family (table).
-------------
-------------
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