I want to take Google Analytic API Query output into Data Table.
So How can i Do this.?
anyone please help me.
its urgent.!!
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
nisha raytePosted Oct 12, 2012, 9:14 AM
var request = _service.Data.Ga.Get( "ga:" + myProfiles.Items[0].Id, "2012-06-01", // start date "2012-06-30", // end date "ga:visitors,ga:pageviews" // metrics to include in report ); request.Dimensions = "ga:date"; //request.Filters = ""; request.Sort = "ga:date"; request.StartIndex = 1; request.MaxResults = 500; GaData results = request.Fetch(); And in that i want to asign Object GaData that is (results) to DataTable.Is It possible?? please provide me Solution...
Santhosh Kumar JayaramanPosted Oct 12, 2012, 8:48 AM
vardata =newgoogle.visualization.DataTable();data.addColumn('string','Referrer');data.addColumn('number','Visits');data.addRows();$row = 0;foreach($referrers as $referrer){?>data.setValue(,0,'');data.setValue(,1,"visits"] ?>);$row++;}?>