PDA

View Full Version : Help with json



mangum
11 Aug 2011, 10:46 PM
Hi people,

I'm trying to use Webtrends json in the Ext Designer, but am having trouble creating the Data Store.

I want to create a data store to reference the dates, page views, visits and visitors to use on a chart, but since the
(Scroll down to the subrows of data for the data I want to use)


[{
"definition":{
"accountID":20426,
"profileID":"EODOnB8NiL6",
"ID":"EODOnB8NiL6",
"name":"test",
"language":null,
"type":"profilestats",
"properties":{
"useRealtime":false,
"isSingleBucket":true,
"total_rda_operations":3,
"total_rda_operations_w_retries":0,
"total_rda_retries":0
},
"dimension":{
"ID":null,
"name":"Date Range",
"type":"period",
"Range":{
"startperiod":"7/1/2011",
"endperiod":"7/31/2011"
},
"Properties":null,
"SubDimension":{
"ID":null,
"name":"Date",
"type":"period",
"Range":null,
"Properties":null,
"SubDimension":null
}
},
"measures":[
{
"name":"Page Views",
"accumulationType":null,
"ID":"PageViews",
"columnID":0,
"measureFormatType":"numeric",
"AllowTotals":false,
"Sortable":false
},
{
"name":"Visits",
"accumulationType":null,
"ID":"Visits",
"columnID":0,
"measureFormatType":"numeric",
"AllowTotals":false,
"Sortable":false
},
{
"name":"Visitors",
"accumulationType":null,
"ID":"Visitors",
"columnID":0,
"measureFormatType":"numeric",
"AllowTotals":false,
"Sortable":false
},
{
"name":"Bounce Rate",
"accumulationType":null,
"ID":"BounceRate",
"columnID":0,
"measureFormatType":"percent",
"AllowTotals":false,
"Sortable":false
},
{
"name":"Avg Time on Site",
"accumulationType":null,
"ID":"AvgTimeOnSite",
"columnID":0,
"measureFormatType":"time_seconds",
"AllowTotals":false,
"Sortable":false
},
{
"name":"Avg Visitors per Day",
"accumulationType":null,
"ID":"AvgVisitorsPerDay",
"columnID":0,
"measureFormatType":"numeric",
"AllowTotals":false,
"Sortable":false
},
{
"name":"Page Views per Visit",
"accumulationType":null,
"ID":"PageViewsPerVisit",
"columnID":0,
"measureFormatType":"numeric",
"AllowTotals":false,
"Sortable":false
},
{
"name":"New Visitors",
"accumulationType":null,
"ID":"NewVisitors",
"columnID":0,
"measureFormatType":"numeric",
"AllowTotals":false,
"Sortable":false
}
]
},
"data":{
"07/01/2011-07/31/2011":{
"Attributes":null,
"measures":{
"Page Views":2346.0,
"Visits":694.0,
"Visitors":536.0,
"Bounce Rate":48.99,
"Avg Time on Site":347.04,
"Avg Visitors per Day":20.39,
"Page Views per Visit":3.38,
"New Visitors":457.0
},
"SubRows":{
"07/01/2011":{
"Attributes":null,
"measures":{
"Page Views":108.0,
"Visits":25.0,
"Visitors":23.0,
"Bounce Rate":40.0,
"Avg Time on Site":359.53,
"Avg Visitors per Day":23.0,
"Page Views per Visit":4.32,
"New Visitors":17.0
},
"SubRows":null
},
"07/02/2011":{
"Attributes":null,
"measures":{
"Page Views":40.0,
"Visits":16.0,
"Visitors":16.0,
"Bounce Rate":56.25,
"Avg Time on Site":83.43,
"Avg Visitors per Day":16.0,
"Page Views per Visit":2.50,
"New Visitors":11.0
},
"SubRows":null
},
"07/03/2011":{
"Attributes":null,
"measures":{
"Page Views":78.0,
"Visits":23.0,
"Visitors":21.0,
"Bounce Rate":43.48,
"Avg Time on Site":294.77,
"Avg Visitors per Day":21.0,
"Page Views per Visit":3.39,
"New Visitors":18.0
},
"SubRows":null
},
"07/04/2011":{
"Attributes":null,
"measures":{
"Page Views":54.0,
"Visits":19.0,
"Visitors":17.0,
"Bounce Rate":47.37,
"Avg Time on Site":213.0,
"Avg Visitors per Day":17.0,
"Page Views per Visit":2.84,
"New Visitors":14.0
},
"SubRows":null
},
"07/05/2011":{
"Attributes":null,
"measures":{
"Page Views":87.0,
"Visits":25.0,
"Visitors":25.0,
"Bounce Rate":52.0,
"Avg Time on Site":419.25,
"Avg Visitors per Day":25.0,
"Page Views per Visit":3.48,
"New Visitors":19.0
},
"SubRows":null
},
"07/06/2011":{
"Attributes":null,
"measures":{
"Page Views":104.0,
"Visits":22.0,
"Visitors":21.0,
"Bounce Rate":45.45,
"Avg Time on Site":404.75,
"Avg Visitors per Day":21.0,
"Page Views per Visit":4.73,
"New Visitors":14.0
},
"SubRows":null
},
"07/07/2011":{
"Attributes":null,
"measures":{
"Page Views":35.0,
"Visits":18.0,
"Visitors":16.0,
"Bounce Rate":50.0,
"Avg Time on Site":90.38,
"Avg Visitors per Day":16.0,
"Page Views per Visit":1.94,
"New Visitors":9.0
},
"SubRows":null
},
"07/08/2011":{
"Attributes":null,
"measures":{
"Page Views":58.0,
"Visits":20.0,
"Visitors":20.0,
"Bounce Rate":55.0,
"Avg Time on Site":440.89,
"Avg Visitors per Day":20.0,
"Page Views per Visit":2.90,
"New Visitors":15.0
},
"SubRows":null
},
"07/09/2011":{
"Attributes":null,
"measures":{
"Page Views":44.0,
"Visits":16.0,
"Visitors":15.0,
"Bounce Rate":50.0,
"Avg Time on Site":182.13,
"Avg Visitors per Day":15.0,
"Page Views per Visit":2.75,
"New Visitors":11.0
},
"SubRows":null
},
"07/10/2011":{
"Attributes":null,
"measures":{
"Page Views":74.0,
"Visits":14.0,
"Visitors":13.0,
"Bounce Rate":42.86,
"Avg Time on Site":362.88,
"Avg Visitors per Day":13.0,
"Page Views per Visit":5.29,
"New Visitors":10.0
},
"SubRows":null
},
"07/11/2011":{
"Attributes":null,
"measures":{
"Page Views":60.0,
"Visits":19.0,
"Visitors":18.0,
"Bounce Rate":47.37,
"Avg Time on Site":553.90,
"Avg Visitors per Day":18.0,
"Page Views per Visit":3.16,
"New Visitors":10.0
},
"SubRows":null
},
"07/12/2011":{
"Attributes":null,
"measures":{
"Page Views":82.0,
"Visits":29.0,
"Visitors":27.0,
"Bounce Rate":58.62,
"Avg Time on Site":301.42,
"Avg Visitors per Day":27.0,
"Page Views per Visit":2.83,
"New Visitors":20.0
},
"SubRows":null
},
"07/13/2011":{
"Attributes":null,
"measures":{
"Page Views":94.0,
"Visits":24.0,
"Visitors":20.0,
"Bounce Rate":37.50,
"Avg Time on Site":304.47,
"Avg Visitors per Day":20.0,
"Page Views per Visit":3.92,
"New Visitors":14.0
},
"SubRows":null
},
"07/14/2011":{
"Attributes":null,
"measures":{
"Page Views":170.0,
"Visits":34.0,
"Visitors":26.0,
"Bounce Rate":38.24,
"Avg Time on Site":383.05,
"Avg Visitors per Day":26.0,
"Page Views per Visit":5.0,
"New Visitors":17.0
},
"SubRows":null
},
"07/15/2011":{
"Attributes":null,
"measures":{
"Page Views":79.0,
"Visits":19.0,
"Visitors":19.0,
"Bounce Rate":31.58,
"Avg Time on Site":452.57,
"Avg Visitors per Day":19.0,
"Page Views per Visit":4.16,
"New Visitors":16.0
},
"SubRows":null
},
"07/16/2011":{
"Attributes":null,
"measures":{
"Page Views":45.0,
"Visits":16.0,
"Visitors":14.0,
"Bounce Rate":56.25,
"Avg Time on Site":431.14,
"Avg Visitors per Day":14.0,
"Page Views per Visit":2.81,
"New Visitors":8.0
},
"SubRows":null
},
"07/17/2011":{
"Attributes":null,
"measures":{
"Page Views":68.0,
"Visits":16.0,
"Visitors":15.0,
"Bounce Rate":37.50,
"Avg Time on Site":468.10,
"Avg Visitors per Day":15.0,
"Page Views per Visit":4.25,
"New Visitors":11.0
},
"SubRows":null
},
"07/18/2011":{
"Attributes":null,
"measures":{
"Page Views":86.0,
"Visits":26.0,
"Visitors":24.0,
"Bounce Rate":34.62,
"Avg Time on Site":282.94,
"Avg Visitors per Day":24.0,
"Page Views per Visit":3.31,
"New Visitors":18.0
},
"SubRows":null
},
"07/19/2011":{
"Attributes":null,
"measures":{
"Page Views":105.0,
"Visits":25.0,
"Visitors":23.0,
"Bounce Rate":32.0,
"Avg Time on Site":237.71,
"Avg Visitors per Day":23.0,
"Page Views per Visit":4.20,
"New Visitors":14.0
},
"SubRows":null
},
"07/20/2011":{
"Attributes":null,
"measures":{
"Page Views":89.0,
"Visits":30.0,
"Visitors":29.0,
"Bounce Rate":40.0,
"Avg Time on Site":328.63,
"Avg Visitors per Day":29.0,
"Page Views per Visit":2.97,
"New Visitors":18.0
},
"SubRows":null
},
"07/21/2011":{
"Attributes":null,
"measures":{
"Page Views":118.0,
"Visits":36.0,
"Visitors":32.0,
"Bounce Rate":63.89,
"Avg Time on Site":521.53,
"Avg Visitors per Day":32.0,
"Page Views per Visit":3.28,
"New Visitors":27.0
},
"SubRows":null
},
"07/22/2011":{
"Attributes":null,
"measures":{
"Page Views":45.0,
"Visits":20.0,
"Visitors":19.0,
"Bounce Rate":50.0,
"Avg Time on Site":172.30,
"Avg Visitors per Day":19.0,
"Page Views per Visit":2.25,
"New Visitors":14.0
},
"SubRows":null
},
"07/23/2011":{
"Attributes":null,
"measures":{
"Page Views":72.0,
"Visits":29.0,
"Visitors":24.0,
"Bounce Rate":65.52,
"Avg Time on Site":224.90,
"Avg Visitors per Day":24.0,
"Page Views per Visit":2.48,
"New Visitors":16.0
},
"SubRows":null
},
"07/24/2011":{
"Attributes":null,
"measures":{
"Page Views":64.0,
"Visits":22.0,
"Visitors":21.0,
"Bounce Rate":54.55,
"Avg Time on Site":130.70,
"Avg Visitors per Day":21.0,
"Page Views per Visit":2.91,
"New Visitors":17.0
},
"SubRows":null
},
"07/25/2011":{
"Attributes":null,
"measures":{
"Page Views":60.0,
"Visits":27.0,
"Visitors":25.0,
"Bounce Rate":66.67,
"Avg Time on Site":501.57,
"Avg Visitors per Day":25.0,
"Page Views per Visit":2.22,
"New Visitors":17.0
},
"SubRows":null
},
"07/26/2011":{
"Attributes":null,
"measures":{
"Page Views":72.0,
"Visits":21.0,
"Visitors":17.0,
"Bounce Rate":57.14,
"Avg Time on Site":231.36,
"Avg Visitors per Day":17.0,
"Page Views per Visit":3.43,
"New Visitors":13.0
},
"SubRows":null
},
"07/27/2011":{
"Attributes":null,
"measures":{
"Page Views":88.0,
"Visits":22.0,
"Visitors":20.0,
"Bounce Rate":45.45,
"Avg Time on Site":516.50,
"Avg Visitors per Day":20.0,
"Page Views per Visit":4.0,
"New Visitors":16.0
},
"SubRows":null
},
"07/28/2011":{
"Attributes":null,
"measures":{
"Page Views":75.0,
"Visits":21.0,
"Visitors":17.0,
"Bounce Rate":28.57,
"Avg Time on Site":398.20,
"Avg Visitors per Day":17.0,
"Page Views per Visit":3.57,
"New Visitors":12.0
},
"SubRows":null
},
"07/29/2011":{
"Attributes":null,
"measures":{
"Page Views":48.0,
"Visits":16.0,
"Visitors":15.0,
"Bounce Rate":56.25,
"Avg Time on Site":333.17,
"Avg Visitors per Day":15.0,
"Page Views per Visit":3.0,
"New Visitors":10.0
},
"SubRows":null
},
"07/30/2011":{
"Attributes":null,
"measures":{
"Page Views":62.0,
"Visits":22.0,
"Visitors":20.0,
"Bounce Rate":54.55,
"Avg Time on Site":330.0,
"Avg Visitors per Day":20.0,
"Page Views per Visit":2.82,
"New Visitors":15.0
},
"SubRows":null
},
"07/31/2011":{
"Attributes":null,
"measures":{
"Page Views":82.0,
"Visits":22.0,
"Visitors":20.0,
"Bounce Rate":72.73,
"Avg Time on Site":856.83,
"Avg Visitors per Day":20.0,
"Page Views per Visit":3.73,
"New Visitors":16.0
},
"SubRows":null
}
}
}
}
}]


How can I reference these fields in a Data Store in Ext Design?

Thanks in advance! :)