Demonstrates a basic Overtime report request, and the resulting
SiteCatalyst response.
Overtime Report
WARNING! Do not cut-and-paste this code sample to try and
generate a report. Rather, use the sample code format and structure as a
template for generating reports using the Reporting API.
// This is the object that you pass to the API call - API calls are described in Report Definition.
reportDescription = {
reportSuiteID = "myrsid",
dateFrom = "2008-01-01",
dateTo = "2008-01-03",
dateGranularity = "day",
metrics = [
{
id = "pageViews"
},
{
id = "visits"
}
]
}
The preceding requests returns the following:
report = {
reportSuite = {
id = "myrsid",
name = "My Report Suite"
},
period = "Mon. 1 Jan. 2008- Wed. 3 Jan. 2008",
elements = [
{
id = "datetime",
name = "Date"
}
],
metrics = [
{
id = "pageViews",
name = "Page Views",
type = "number"
},
{
id = "visits",
name = "Visits",
type = "number"
},
],
type = "overtime",
data = [
{
name = "Mon. 1 Jan. 2008",
year = 2008,
month = 1,
day = 1,
counts = [2,2]
},
{
name = "Tue. 2 Jan. 2008",
year = 2008,
month = 1,
day = 2,
counts = [1143,131]
},
{
name = "Wed. 3 Jan. 2008",
year = 2008,
month = 1,
day = 3,
counts = [1212,146],
}
],
totals = [2357,276]
}
Comments (0)
Must be logged in to comment. Login or register now to comment!