Report with day field

173 views
Skip to first unread message

Chirag

unread,
May 8, 2012, 8:34:38 AM5/8/12
to adwor...@googlegroups.com
Hello All,

I wants to get data day basis. So that i am including day field, but result is more than one row for same campaign and same day. is there any way so that i can get one day field for one campaign in report?

Thanks

David Torres

unread,
May 11, 2012, 3:23:55 PM5/11/12
to adwor...@googlegroups.com
Hi Chirag,

You might be including another segmentation field in your report that is causing multiple rows for the same day/campaign combination, how your report definition looks like exactly?

Best,

-David Torres - AdWords API Team

Chirag

unread,
May 12, 2012, 8:22:25 AM5/12/12
to adwor...@googlegroups.com
Hello Anash,
Here is the report definition for ad performance report. here also i am getting for same day multiple row and same ad id.

        $selector = new Selector();
        $reportDefinition = new ReportDefinition();
        $selector->dateRange = new DateRange($startDate, $endDate);
        $array = array(
            'AdGroupId', 'AdGroupName', 'AdGroupStatus', 'AdNetworkType1', 'AdNetworkType2', 'AdType', 'AverageCpc', 'AverageCpm', 'AveragePosition', 'Device',
            'CampaignId', 'CampaignName', 'CampaignStatus', 'Clicks',
            'Ctr', 'Cost', 'Conversions', 'CostPerConversion', 'ConversionRate', 'ConversionsManyPerClick',
            'CostPerConversionManyPerClick', 'ConversionRateManyPerClick', 'Headline', 'Id', 'Status', 'Description1', 'Description2',
            'Impressions', 'TotalConvValue', 'ValuePerConversion','DisplayUrl','Url','Date');
       
                $campaignStatusPredicate = new Predicate('CampaignStatus', 'IN', array('ACTIVE', 'PAUSED')); //ACTIVE, DELETED, PAUSED
                $AdgrpstatusPredicate = new Predicate('Status', 'IN', array('ENABLED')); //ENABLED, PAUSED, DELETED
                $statusPredicate = new Predicate('AdGroupStatus', 'IN', array('ENABLED'));
                $selector->predicates = array($AdgrpstatusPredicate, $statusPredicate, $campaignStatusPredicate);
                $reportDefinition->reportName = 'Ad performance report #' . time();
                $reportDefinition->dateRangeType ='CUSTOM_DATE';
                $reportDefinition->reportType = 'AD_PERFORMANCE_REPORT';
                $reportDefinition->includeZeroImpressions = FALSE; 

Thanks,
Chirag

Chirag

unread,
May 18, 2012, 3:28:55 AM5/18/12
to adwor...@googlegroups.com
Hello Anash,
Any update?
What i am doing wrong with the code.

Thanks,
Chirag

David Torres

unread,
May 22, 2012, 5:22:04 PM5/22/12
to adwor...@googlegroups.com
Hi Chirag,

Your are including many fields that will segment your report in multiple rows (i.e.  'AdNetworkType1', 'AdNetworkType2', 'Date')

Please read the section behavior of this reference https://developers.google.com/adwords/api/docs/appendix/reports for more information.

Best,

-David

Chirag

unread,
May 23, 2012, 5:52:41 AM5/23/12
to adwor...@googlegroups.com
Thanks David,

Now got the desired report.
Reply all
Reply to author
Forward
0 new messages