Hi,
We had retrieved all data reports of Google AdWords but all of the report data of Cost column is not getting proper data/value.
As in our AdWords Account data is shown as 12.4 for cost column but while retrieving we are getting it as 234000 which is large enough.
Below is the code sample of report data retrieved :-
if (getIndex == "Account_Performance_Report")
{
#region ACCOUNT_PERFORMANCE_REPORT
ConfigureUserForOAuth();
ReportDefinition definition = new ReportDefinition();
definition.reportName = "ALL_TIME ACCOUNT_PERFORMANCE_REPORT";
definition.reportType = ReportDefinitionReportType.ACCOUNT_PERFORMANCE_REPORT;
definition.downloadFormat = DownloadFormat.XML;
definition.dateRangeType = ReportDefinitionDateRangeType.ALL_TIME;
// Create selector.
Selector selector = new Selector();
//selector.fields = new string[] { "CampaignId", "CampaignName", "CampaignStatus", "Clicks", "Impressions", "Cost", "Ctr", "ClickConversionRate" };
selector.fields = new string[] { "AccountCurrencyCode","AccountDescriptiveName","AccountTimeZoneId","AdNetworkType1",
"AdNetworkType2","AverageCpc","AverageCpm","AveragePosition","CanManageClients","ClickConversionRate","Clicks",
"ConversionRateManyPerClick","ConversionValue","ConversionsManyPerClick",
"ConvertedClicks","Cost","CostPerConversionManyPerClick","CostPerConvertedClick","Ctr",
"CustomerDescriptiveName","Date","DayOfWeek","Device","EstimatedCrossDeviceConversions","EstimatedTotalConversionRate",
"EstimatedTotalConversionValue","EstimatedTotalConversionValuePerClick","EstimatedTotalConversionValuePerCost",
"EstimatedTotalConversions","ExternalCustomerId","Impressions","InvalidClickRate","InvalidClicks",
"IsAutoTaggingEnabled","IsTestAccount","Month","MonthOfYear","PrimaryCompanyName","Quarter","SearchBudgetLostImpressionShare",
"SearchExactMatchImpressionShare","SearchImpressionShare","SearchRankLostImpressionShare",
"ValuePerConversionManyPerClick","ValuePerConvertedClick","ValuePerEstimatedTotalConversion","ViewThroughConversions",
"Week","Year" };
(user.Config as AdWordsAppConfig).ClientCustomerId = txtCustomerId;
//if (Session["OAuthProvider"] != null)
//{
//Predicate predicate = new Predicate();
//predicate.field = "AccountDescriptiveName";
//predicate.@operator = PredicateOperator.IN;
//predicate.values = new string[] { "PAUSED", "ENABLED" };
//selector.predicates = new Predicate[] { predicate };
definition.selector = selector;
definition.includeZeroImpressions = true;
string filePath = Path.GetTempFileName();
string tgrfilePath = Server.MapPath(@"~/FileUpload/");
// string filePath = @"~\UploadExcel\";
//string Newfile;
ReportUtilities utilities = new ReportUtilities(user, "v201502", definition);
try
{
using (ReportResponse response = utilities.GetResponse())
{
response.Save(filePath);
}
}
}
If any solution regarding the above mentioned problem please help on early basis.
For reference have a glance at the attached file.
Please reply as early as possible.