Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google Analytics BatchGet Report | Report Names

What would be the best solution to give a report a name when make a report:batchGet?

var url = Google.Common.Configuration.Endpoints.ReportBatchGet;
var reportRequest = JsonConvert.SerializeObject(_reportRequests);

try
{
    var tReports = await gc.PostAsyncTask(url,reportRequest);

    int cnt = 0;
    foreach (var report in tReports.reports)
    {
        if (report != null)
        {
            DataTable dt =  Google.Utils.ReportHandler.GoolgeBatchReportCreateDataTable(report,
                            _reportRequests.reportRequests.FirstOrDefault().viewId, **"REPORT_NAME"**);
                            Utils.ReportHandler.DataSetCellHandler(dt);

        }
    }

I have an array of reports which I convert into Json and make a post to get the data, the results are fine. I would like to give a name to the DataTable when convert the results in a DataTable but Google Analytics do not accept a report name or alias in the batchGet.

Any ideas?

like image 802
bmvr Avatar asked Apr 09 '26 22:04

bmvr


1 Answers

There is no way of adding a report name to each report within in a batch request. to the Google Analytics Reporting API.

It is already an issue I have spotted and I have requested they add it to the API. The team accepted my request but there is no time frame on when they will add this feature.

like image 68
DaImTo Avatar answered Apr 12 '26 11:04

DaImTo