Hi,

If you can share your customer ID, a report definition you sent to the 
server, and a report with incorrect data, I could take a look. Please use 
the "Reply to Author" option when sending the details.

Cheers,
Anash P. Oommen,
AdWords API Advisor.

On Sunday, March 22, 2015 at 11:44:33 AM UTC-4, PPC Developer wrote:
>
> Hi,
>
> I'm downloading the keyword performance report for further processing. 
> When downloading the report using "Conversion Name" segment, the downloaded 
> report has different values compared to the same report downloaded via the 
> browser. We have 2 conversions we are tracking : "Needs Posted" and "Needs 
> Paid". The "Needs Posted" values are fine, however the "Needs Paid" segment 
> is reporting very few results : 870 vs 5 in the report downloaded via the 
> API. 
>
> The code is below:
>
>
>      public void DownloadKeywordReport_ConversionName(string reportType, 
> string dateRange, string filters, string MCCAccount, DateTime repStartDate, 
> DateTime repEndDate)
>         {
>
>             ReportDefinition definition = new ReportDefinition();
>             Selector selector = new Selector();
>
>
>             definition.reportName = reportType;
>             if (reportType == "KEYWORDS_PERFORMANCE_REPORT")
>                 definition.reportType = 
> ReportDefinitionReportType.KEYWORDS_PERFORMANCE_REPORT;
>             else if (reportType == "CAMPAIGN_PERFORMANCE_REPORT")
>                 definition.reportType = 
> ReportDefinitionReportType.CAMPAIGN_PERFORMANCE_REPORT;
>             else if (reportType == "SEARCH_TERM_PERFORMANCE_REPORT")
>                 definition.reportType = 
> ReportDefinitionReportType.SEARCH_QUERY_PERFORMANCE_REPORT;
>
>             else Console.WriteLine("{0} - is an undefined report type", 
> reportType);
>
>             definition.downloadFormat = DownloadFormat.CSV;
>             if (dateRange == "LAST_7_DAYS")
>                 definition.dateRangeType = 
> ReportDefinitionDateRangeType.LAST_7_DAYS;
>             else if (dateRange == "YESTERDAY")
>                 definition.dateRangeType = 
> ReportDefinitionDateRangeType.YESTERDAY;
>             else if (dateRange == "ONE_DAY")
>             {
>                 definition.dateRangeType = 
> ReportDefinitionDateRangeType.CUSTOM_DATE;
>                 DateRange repdateRange = new DateRange { min = 
> reportDate.ToString(@"yyyyMMdd"), max = reportDate.ToString(@"yyyyMMdd") };
>                 selector.dateRange = repdateRange;
>             }
>             else if (dateRange == "CUSTOM_RANGE")
>             {
>                 definition.dateRangeType = 
> ReportDefinitionDateRangeType.CUSTOM_DATE;
>                 DateRange repdateRange = new DateRange { min = 
> repStartDate.ToString(@"yyyyMMdd"), max = repEndDate.ToString(@"yyyyMMdd") 
> };
>                 selector.dateRange = repdateRange;
>             }
>
>
>             selector.fields = new string[] {                 
>                
>                 "ConversionTypeName",
>                 "KeywordText",
>                 "Conversions",
>                 "CampaignName",
>                 "CampaignId",
>             };
>
>
>             definition.selector = selector;
>             definition.includeZeroImpressions = false;
>
>
>             try
>             {
>
>                 AdWordsUser user = new AdWordsUser();
>                 AdWordsAppConfig config = (AdWordsAppConfig)user.Config;
>                 config.ClientCustomerId = MCCAccount;
>                 config.DeveloperToken = this.MCCAccount.developerToken;
>                 config.OAuth2ClientId = this.MCCAccount.OAuth2ClientId;
>                 config.OAuth2ClientSecret = 
> this.MCCAccount.OAuth2ClientSecret;
>                 config.OAuth2RefreshToken = 
> this.MCCAccount.OAuth2RefreshToken;
>
>                 ReportUtilities utilities = new ReportUtilities(user);
>                 
>                 ClientReport report = 
> utilities.GetClientReport(definition);
>                 string deflatedReportText = 
> Encoding.UTF8.GetString(report.Contents);
>
>                 List<string> lines = 
> deflatedReportText.Split('\n').ToList();
>                 
> JawabkomCommon.Utilities.WriteFileWithAutoIncrement("KeywordSegmentDownload.csv",
>  
> lines);
>
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+:
https://googleadsdeveloper.blogspot.com/
https://plus.google.com/+GoogleAdsDevelopers/posts
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API Forum" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
Visit this group at http://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/068475e9-4206-4aa0-b60f-fccd0d3367ae%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to