- Previous: Application Service
- Up: Services
- Next:
Analytics Service
Overview
The analytics service provides calls to retrieve your applications analytics data.
Methods
- enroll(applicationCode)
- retrieveDateStatistics(applicationCode, startDate, endDate, timePeriod)
- retrieveGeoStatistics(applicationCode, startDate, endDate, timePeriod)
- retrieveGeoStatisticsByCountry(applicationCode, startDate, endDate, timePeriod, country)
- retrieveGeoStatisticsByRegion(applicationCode, startDate, endDate, timePeriod, country, region)
- retrieveGeoStatisticsByCity(applicationCode, startDate, endDate, timePeriod, country, region, city)
- retrieveActionStatistics(applicationCode, startDate, endDate, timePeriod, actions)
- retrieveDeviceStatistics(applicationCode, startDate, endDate, timePeriod, devices)
- retrieveVersionStatistics(applicationCode, startDate, endDate, timePeriod, versions)
enroll(applicationCode)
Overview
This method is used to enroll an application in analytics.
Parameters
applicationCode: string - The application code for an application associated with the current developer
Response
Either success or error.
Example Response
{
"response":"success",
"data":"success"
}
retrieveDateStatistics(applicationCode, startDate, endDate, timePeriod)
Overview
This method is used to retrieve general statistics for an application for a specific time period and date range.
Parameters
applicationCode: string - The application code for an application associated with the current developer
startDate: timestamp - Timestamp of when the date period starts. Should be midnight UTC.
endDate: timestamp - Timestamp of when the date period ends. Should be midnight UTC.
timePeriod: string - lifetime, month, week, or day
Response
Array of stats according to the time period and the date range supplied.
Example Response
{
"response":"success",
"data":{
"stats":{
"1230786000":{
"startDate":1230786000,
"endDate":1233464400,
"uniqueUsers":"96762",
"sessions":"385951",
"crashes":"1075",
"totalTimeSpent":"144069168",
"timeSpentPerUser":1488.90233769,
"timeSpentPerSession":374.326193371,
"sessionsPerUser":3.98866290486,
"newUsers":"16080",
"salesEstimateGross":15919.2,
"salesEstimateNet":11143.44,
"salesEstimateFees":4775.76,
"currencySymbol":"$"
}
}
}
}
retrieveGeoStatistics(applicationCode, startDate, endDate, timePeriod)
Overview
This method is used to retrieve geo statistics for an application for a specific time period and date range.
Parameters
applicationCode: string - The application code for an application associated with the current developer
startDate: timestamp - Timestamp of when the date period starts. Should be midnight UTC.
endDate: timestamp - Timestamp of when the date period ends. Should be midnight UTC.
timePeriod: string - lifetime, month, week, or day
Response
Array of geo stats according to the time period and the date range supplied.
Example Response
{
"response":"success",
"data":{
"stats":{
"1230786000":{
"startDate":1230786000,
"endDate":1233464400,
"countries":{
"US":{
"name":"United States",
"uniqueUsers":"1523551",
"sessions":"9151120",
"regions":{
"Unknown":{
"name":"Unknown",
"uniqueUsers":"776597",
"sessions":"3280492",
"cities":[]
},"CA":{
"name":"California",
"uniqueUsers":"225174",
"sessions":"1153117",
"cities":{
"5391959":{
"name":"San Francisco",
"uniqueUsers":"13895",
"sessions":"45428"
},"5391811":{
"name":"San Diego",
"uniqueUsers":"8817",
"sessions":"29639"
},
...
},
},
...
}
},
...
}
}
}
}
retrieveGeoStatisticsByCountry(applicationCode, startDate, endDate, timePeriod, country)
Overview
This method is used to retrieve geo statistics on the country level for an application for a specific time period and date range.
Parameters
applicationCode: string - The application code for an application associated with the current developer
startDate: timestamp - Timestamp of when the date period starts. Should be midnight UTC.
endDate: timestamp - Timestamp of when the date period ends. Should be midnight UTC.
timePeriod: string - lifetime, month, week, or day
country: string - optional, restricts the results to a specific country
Response
Array of geo stats according to the time period and the date range supplied.
Example Response
{
"response":"success",
"data":{
"stats":{
"1230786000":{
"startDate":1230786000,
"endDate":1233464400,
"countries":{
"US":{
"name":"United States",
"uniqueUsers":"1523551",
"sessions":"9151120"
},"GB":{
"name":"United Kingdom",
"uniqueUsers":"166783",
"sessions":"822851"
},"CA":{
"name":"Canada",
"uniqueUsers":"131506",
"sessions":"730902"
},
...
}
}
}
}
}
retrieveGeoStatisticsByRegion(applicationCode, startDate, endDate, timePeriod, country, region)
Overview
This method is used to retrieve geo statistics on the region level for an application for a specific time period and date range.
Parameters
applicationCode: string - The application code for an application associated with the current developer
startDate: timestamp - Timestamp of when the date period starts. Should be midnight UTC.
endDate: timestamp - Timestamp of when the date period ends. Should be midnight UTC.
timePeriod: string - lifetime, month, week, or day
country: string - optional, restricts the results to a specific country
region: string - optional, restricts the results to a specific region
Response
Array of geo stats according to the time period and the date range supplied.
Example Response
{
"response":"success",
"data":{
"stats":{
"1230786000":{
"startDate":1230786000,
"endDate":1233464400,
"regions":{
"CA":{
"countryCode":"US",
"country":"United States",
"name":"California",
"uniqueUsers":"225174",
"sessions":"1153117"
},"TX":{
"countryCode":"US",
"country":"United States",
"name":"Texas",
"uniqueUsers":"119652",
"sessions":"665732"
},
...
}
}
}
}
}
retrieveGeoStatisticsByCity(applicationCode, startDate, endDate, timePeriod, country, region, city)
Overview
This method is used to retrieve geo statistics on the city level for an application for a specific time period and date range.
Parameters
applicationCode: string - The application code for an application associated with the current developer
startDate: timestamp - Timestamp of when the date period starts. Should be midnight UTC.
endDate: timestamp - Timestamp of when the date period ends. Should be midnight UTC.
timePeriod: string - lifetime, month, week, or day
country: string - optional, restricts the results to a specific country
region: string - optional, restricts the results to a specific region
city: string - optional, restricts the results to a specific city
Response
Array of geo stats according to the time period and the date range supplied.
Example Response
{
"response":"success",
"data":{
"stats":{
"1230786000":{
"startDate":1230786000,
"endDate":1233464400,
"cities":{
"6167865":{
"countryCode":"CA",
"country":"Canada",
"regionCode":"08",
"region":"Ontario",
"name":"Toronto",
"uniqueUsers":"24081",
"sessions":"115842"
},"5128581":{
"countryCode":"US",
"country":"United States",
"regionCode":"NY",
"region":"New York",
"name":"New York City",
"uniqueUsers":"22206",
"sessions":"71780"
},
...
}
}
}
}
}
retrieveActionStatistics(applicationCode, startDate, endDate, timePeriod, actions)
Overview
This method is used to retrieve action statistics for an application for a specific time period and date range.
Parameters
applicationCode: string - The application code for an application associated with the current developer
startDate: timestamp - Timestamp of when the date period starts. Should be midnight UTC.
endDate: timestamp - Timestamp of when the date period ends. Should be midnight UTC.
timePeriod: string - lifetime, month, week, or day
actions: string[] - Array of action strings to restrict the stats returned
Response
Array of action stats according to the time period and the date range supplied.
Example Response
{
"response":"success",
"data":{
"stats":{
"1230786000":{
"startDate":1230786000,
"endDate":1233464400,
"actions":{
"61395":{
"name":"Subbeacon1",
"is_session":"0",
"occurrences":"9324408",
"uniqueUsers":"1773965",
"sessions":"9324408",
"averageActionsPerSession":1
},"61373":{
"name":"Subbeacon2",
"is_session":"1",
"occurrences":"9559194",
"uniqueUsers":"1607140",
"sessions":"5646559",
"averageActionsPerSession":1.69292377889,
"totalTimeSpent":"1708845698",
"averageTimePerUser":1063.28365793,
"averageTimePerAction":178.764621578,
"averageTimePerSession":302.634878693
},
...
}
}
}
}
}
retrieveDeviceStatistics(applicationCode, startDate, endDate, timePeriod, devices)
Overview
This method is used to retrieve action statistics for an application for a specific time period and date range.
Parameters
applicationCode: string - The application code for an application associated with the current developer
startDate: timestamp - Timestamp of when the date period starts. Should be midnight UTC.
endDate: timestamp - Timestamp of when the date period ends. Should be midnight UTC.
timePeriod: string - lifetime, month, week, or day
devices: string[] - Array of device strings to restrict the stats returned
Response
Array of action stats according to the time period and the date range supplied.
Example Response
{
"response":"success",
"data":{
"stats":{
"1230786000":{
"startDate":1230786000,
"endDate":1233464400,
"devices":{
"iPhone1,2":{
"startDate":1230786000,
"endDate":1233464400,
"uniqueUsers":"980424",
"sessions":"6542106",
"crashes":"243045",
"totalTimeSpent":"3876810608",
"timeSpentPerUser":3954.21838715,
"timeSpentPerSession":615.458495798,
"sessionsPerUser":6.67273138968,
"newUsers":"366176"
},"iPod2,1":{
"startDate":1230786000,
"endDate":1233464400,
"uniqueUsers":"282367",
"sessions":"1317415",
"crashes":"29041",
"totalTimeSpent":"1218058579",
"timeSpentPerUser":4313.74267885,
"timeSpentPerSession":945.423129464,
"sessionsPerUser":4.66561248305,
"newUsers":"180288"
},
...
}
}
}
}
}
retrieveVersionStatistics(applicationCode, startDate, endDate, timePeriod, versions)
Overview
This method is used to retrieve action statistics for an application for a specific time period and date range.
Parameters
applicationCode: string - The application code for an application associated with the current developer
startDate: timestamp - Timestamp of when the date period starts. Should be midnight UTC.
endDate: timestamp - Timestamp of when the date period ends. Should be midnight UTC.
timePeriod: string - lifetime, month, week, or day
versions: string[] - Array of version strings to restrict the stats returned
Response
Array of action stats according to the time period and the date range supplied.
Example Response
{
"response":"success",
"data":{
"stats":{
"1230786000":{
"startDate":1230786000,
"endDate":1233464400,
"versions":{
"1.0":{
"startDate":1230786000,
"endDate":1233464400,
"uniqueUsers":"1814358",
"sessions":"10630407",
"crashes":"359568",
"totalTimeSpent":"7741257615",
"timeSpentPerUser":4266.66491122,
"timeSpentPerSession":753.712293124,
"sessionsPerUser":5.85904600966,
"newUsers":"845461"
},"1.1":{
"startDate":1230786000,
"endDate":1233464400,
"uniqueUsers":"49944",
"sessions":"210409",
"crashes":"3345",
"totalTimeSpent":"225513306",
"timeSpentPerUser":4515.32328208,
"timeSpentPerSession":1089.09953444,
"sessionsPerUser":4.21289844626,
"newUsers":"4016"
},
...
}
}
}
}
}
- Previous: Application Service
- Up: Services
- Next:

Comments
Matt West – 5 months ago
Could you provide the requests which got you the example responses please. I think that would be really useful.
Thanks
Matt.
Please sign in to post a comment.