Geo location - Area Codes

Display a list of telephone area codes which your visitors come from.

API Usage

This API produces a json array.

Parameters

One or more of the following parameters are required:

date Calculate the top area codes from the specified date entered as yyyy-MM-dd. Default is the current date.
unixTime Calculate the top area codes from the specified unix timestamp. Default is the current unix timestamp.
period Specify the 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 Calculate the top area codes for the specified timezone. Default is the site's defined timezone.

Optional parameters:

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 to display data for. 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. A list of locales can be found here.
ignoreLocale Display columns without language translation [false]|true.
dataType The dataType parameter determines the format of data returned. Values can be [ json ] | html | jsondatatable | jsonjqgrid | csv | svg | png.

Examples

Display a top area codes list for the website www.opentracker.net from 2017-06-23 and three weeks back display in html:
HTTP GET/ POST:/api/location/top_area_codes.jsp?date=2017-06-23&login=demo@opentracker.net&password=demo123&site=www.opentracker.net&period=3w&dataType=html
Display a top area codes list for the website www.opentracker.net for 2017-06-23:
HTTP GET/ POST:/api/location/top_area_codes.jsp?date=2017-06-23
Display a top area codes list for the website www.opentracker.net for the user "demo@opentracker.net" with password "demo123":
HTTP GET/ POST:/api/location/top_area_codes.jsp?period=1d&login=demo@opentracker.net&password=demo123&site=www.opentracker.net

Response

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

{ "resultsList": [
{
"No.":"1",
"telephone area codes for U.S.":"650",
"(state, city)":"(CA, Palo Alto)",
"users":"5",
"graph":"||||||||||||||||||||",
"percentage":"12.5%"}
,
{
"No.":"2",
"telephone area codes for U.S.":"212",
"(state, city)":"(NY, New York)",
"users":"2",
"graph":"||||||||",
"percentage":"5.0%"}
,
{
"No.":"3",
"telephone area codes for U.S.":"719",
"(state, city)":"(CO, Colorado Springs)",
"users":"2",
"graph":"||||||||",
"percentage":"5.0%"}
,
{
"No.":"4",
"telephone area codes for U.S.":"480",
"(state, city)":"(AZ, Mesa)",
"users":"2",
"graph":"||||||||",
"percentage":"5.0%"}
,
{
"No.":"5",
"telephone area codes for U.S.":"425",
"(state, city)":"(WA, Bellevue)",
"users":"2",
"graph":"||||||||",
"percentage":"5.0%"}
,
{
"No.":"6",
"telephone area codes for U.S.":"703",
"(state, city)":"(VA, Arlington)",
"users":"2",
"graph":"||||||||",
"percentage":"5.0%"}
,
{
"No.":"7",
"telephone area codes for U.S.":"626",
"(state, city)":"(CA, Pasadena)",
"users":"2",
"graph":"||||||||",
"percentage":"5.0%"}
,
{
"No.":"8",
"telephone area codes for U.S.":"770",
"(state, city)":"(GA, Atlanta)",
"users":"1",
"graph":"||||",
"percentage":"2.5%"}
,
{
"No.":"9",
"telephone area codes for U.S.":"410",
"(state, city)":"(MD, Baltimore)",
"users":"1",
"graph":"||||",
"percentage":"2.5%"}
,
{
"No.":"10",
"telephone area codes for U.S.":"630",
"(state, city)":"(IL, Naperville)",
"users":"1",
"graph":"||||",
"percentage":"2.5%"}
,
{
"No.":"11",
"telephone area codes for U.S.":"631",
"(state, city)":"(NY, Smithtown)",
"users":"1",
"graph":"||||",
"percentage":"2.5%"}
,
{
"No.":"12",
"telephone area codes for U.S.":"973",
"(state, city)":"(NJ, Paterson)",
"users":"1",
"graph":"||||",
"percentage":"2.5%"}
,
{
"No.":"13",
"telephone area codes for U.S.":"512",
"(state, city)":"(TX, Austin)",
"users":"1",
"graph":"||||",
"percentage":"2.5%"}
,
{
"No.":"14",
"telephone area codes for U.S.":"215",
"(state, city)":"(PA, Philadelphia)",
"users":"1",
"graph":"||||",
"percentage":"2.5%"}
,
{
"No.":"15",
"telephone area codes for U.S.":"415",
"(state, city)":"(CA, San Francisco)",
"users":"1",
"graph":"||||",
"percentage":"2.5%"}
,
{
"No.":"16",
"telephone area codes for U.S.":"713",
"(state, city)":"(TX, Houston)",
"users":"1",
"graph":"||||",
"percentage":"2.5%"}
,
{
"No.":"17",
"telephone area codes for U.S.":"714",
"(state, city)":"(CA, Anaheim)",
"users":"1",
"graph":"||||",
"percentage":"2.5%"}
,
{
"No.":"18",
"telephone area codes for U.S.":"813",
"(state, city)":"(FL, Tampa)",
"users":"1",
"graph":"||||",
"percentage":"2.5%"}
,
{
"No.":"19",
"telephone area codes for U.S.":"815",
"(state, city)":"(IL, Rockford)",
"users":"1",
"graph":"||||",
"percentage":"2.5%"}
,
{
"No.":"20",
"telephone area codes for U.S.":"816",
"(state, city)":"(MO, Kansas City)",
"users":"1",
"graph":"||||",
"percentage":"2.5%"}
,
{
"No.":"21",
"telephone area codes for U.S.":"619",
"(state, city)":"(CA, San Diego)",
"users":"1",
"graph":"||||",
"percentage":"2.5%"}
,
{
"No.":"22",
"telephone area codes for U.S.":"281",
"(state, city)":"(TX, Houston)",
"users":"1",
"graph":"||||",
"percentage":"2.5%"}
,
{
"No.":"23",
"telephone area codes for U.S.":"360",
"(state, city)":"(WA, Vancouver)",
"users":"1",
"graph":"||||",
"percentage":"2.5%"}
,
{
"No.":"24",
"telephone area codes for U.S.":"321",
"(state, city)":"(FL, Melbourne)",
"users":"1",
"graph":"||||",
"percentage":"2.5%"}
,
{
"No.":"25",
"telephone area codes for U.S.":"740",
"(state, city)":"(OH, Newark)",
"users":"1",
"graph":"||||",
"percentage":"2.5%"}
,
{
"No.":"26",
"telephone area codes for U.S.":"301",
"(state, city)":"(MD, Silver Spring)",
"users":"1",
"graph":"||||",
"percentage":"2.5%"}
,
{
"No.":"27",
"telephone area codes for U.S.":"940",
"(state, city)":"(TX, Denton)",
"users":"1",
"graph":"||||",
"percentage":"2.5%"}
,
{
"No.":"28",
"telephone area codes for U.S.":"303",
"(state, city)":"(CO, Denver)",
"users":"1",
"graph":"||||",
"percentage":"2.5%"}
,
{
"No.":"29",
"telephone area codes for U.S.":"864",
"(state, city)":"(SC, Greenville)",
"users":"1",
"graph":"||||",
"percentage":"2.5%"}
,
{
"No.":"30",
"telephone area codes for U.S.":"505",
"(state, city)":"(NM, Albuquerque)",
"users":"1",
"graph":"||||",
"percentage":"2.5%"}
,
{
"No.":"",
"telephone area codes for U.S.":"",
"(state, city)":"",
"users":"40",
"graph":"",
"percentage":"100%"}
]
}

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