Adwords data has difference in records ?

31 views
Skip to first unread message

Jaydeep More

unread,
Jun 6, 2017, 6:08:20 AM6/6/17
to AdWords API Forum
  I following way to get records from ad words 

startdate = 2012-11-01
endDate = 2017-06-06

while (startDate < endDate)
{
    reportDate = startDate.tostring("yyyyMMdd");
     string query = "SELECT " +
                                  "CampaignName, AdGroupName, Criteria, CpcBid, Impressions, Clicks,Conversions,Cost " +
                                  "FROM  PLACEMENT_PERFORMANCE_REPORT " +
                                 "WHERE AdNetworkType1 = 'CONTENT' " +               // 'CONTENT' indicated only Display Networks
                                 "DURING " + reportDate + ", " + reportDate ;
   //perform some logic
   startDate.AddDays(-1);
}

above code is now creating issue like report request exceeded 
-----------------------------------------------------------------------------------------------------------------------------------------------------------
i want to do is perform above code like this

if(startDate<EndDate)
{
  reportStartDate = startDate.tostring("yyyyMMdd");
  reportEndDate = startDate.tostring("yyyyMMdd");
     string query = "SELECT " +
                                  "CampaignName, AdGroupName, Criteria, CpcBid, Impressions, Clicks,Conversions,Cost " +
                                  "FROM  PLACEMENT_PERFORMANCE_REPORT " +
                                 "WHERE AdNetworkType1 = 'CONTENT' " +               // 'CONTENT' indicated only Display Networks
                                 "DURING " + reportStartDate + ", " + reportEndDate ;
  //perform some logic
}


code sample 1 gives no of record 101841 
code sample 2 gives no of record 11181

how can i achieve data accuracy in 2nd sample

Regards,
 Jaydeep More

Shwetha Vastrad (AdWords API Team)

unread,
Jun 6, 2017, 12:47:34 PM6/6/17
to AdWords API Forum
Hi Jaydeep, 

In the first scenario, I see that you are decreasing the startDate by 1 in each iteration. This may result in a RateExceededError as it looks the loop termination condition is not met. I see that you are trying to download Placement Performance Report for each day in the given date range. You could consider including the Date field in the report query and specify CUSTOM_DATE for the dateRangeType. and include your dateRange in YYYYMMDD format on your selector as shown here

Could you provide the complete report query including the dateRange and the clientCustomerId for which you see this difference along with some samples of the observed discrepancy so I can take a further look? Please use Reply privately to author when responding. 

Regards,
Shwetha, AdWords API Team.
Reply all
Reply to author
Forward
0 new messages