google-ads-dotnet
google-ads-dotnet copied to clipboard
Unable to get Upload Date from my Offline Conversion : Daily Summary, using the new OfflineConversionUploadClientSummary report in V15
Describe the bug:
I'm trying to implement a service for my Offline Conversion using the new OfflineConversionUploadClientSummary report.
I'm trying to Query data from this page :
When i query my OfflineConversionUploadClientSummary and parse all my OfflineConversionUploadClientSummary .daily_summaries[], they don't have any uploading Date available, accordingly to the doc i should have either job_id or upload_date
but any of my daily summary got thoses information :
Is this suppose to happen ?
Am i querying the right endpoint ?
Steps to Reproduce:
Here is my service :
` using Google.Ads.GoogleAds.V15.Services; using GoogleAdsDataLayer.Models.QueryBuilder.Format; using GoogleAdsDataLayer.Models.QueryBuilder.Queries; using GoogleAdsDataLayer.Models.Requests; using System; using System.Collections.Generic;
namespace GoogleAdsDataLayer.Services.OfflineConversion { public class OfflineConversionUploadClientSummaryService : GoogleAdsService<OfflineConversionUploadClientSummaryService>, IOfflineConversionUploadClientSummaryService { public OfflineConversionUploadClientSummaryService() { Endpoint = "offline_conversion_upload_client_summary"; }
public IEnumerable<GoogleAdsRow> GetOfflineConversionsUploadClientSummary(Request request)
{
return PerformQuery(new Query(request, Endpoint));
}
}
} `
and how i query my data :
` protected readonly IOfflineConversionUploadClientSummaryService _offlineConversionService = UsmServiceProvider.GetGoogleAdsService<IOfflineConversionUploadClientSummaryService>();
var request = new Request(long.Parse(accountId))
{
Fields = new List
IEnumerable<GoogleAdsRow> dataRows = _offlineConversionService.GetOfflineConversionsUploadClientSummary(request);`
Please provide a code snippet or steps to consistently reproduce the experienced behavior. [DO NOT INCLUDE ANY PERSONAL OR SENSITIVE DATA IN YOUR SUBMITTED CODE]
Expected behavior: I need to query the success rate of every daily Summary to report when my upload success rate is under a specific threshold using this ` IEnumerable<OfflineConversionSummary> uploadSummariesWithTooManyErrors = dataRows.SelectMany(row => row.OfflineConversionUploadClientSummary.DailySummaries) .Where(summary => IsSuccessRateLowerThanThreshold(summary) && IsUploadDateInRange(summary));
private bool IsUploadDateInRange(OfflineConversionSummary summary)
{ return DateTime.Parse(summary.UploadDate, new CultureInfo("en-US")) > DateTime.Now.AddDays(-_numberOfDayToAnalyse); }
private bool IsSuccessRateLowerThanThreshold(OfflineConversionSummary summary) { return GetUploadSummarySuccessRate(summary) < _uploadSuccessPercentage; }
private double GetUploadSummarySuccessRate(OfflineConversionSummary uploadSummary) { double totalUpload = uploadSummary.SuccessfulCount + uploadSummary.FailedCount; double successRate = Math.Round(((uploadSummary.SuccessfulCount * 100) / totalUpload), 2);
return successRate;
}`
Client library version and API version: Client library version: Google Ads API version: 17.1.0 .NET version: 4.72 Operating system (Linux, Windows, ...) and version (if the bug is platform-specific): Windowq
Request/Response Logs:
Anything else we should know about your project / environment
The request seems fine...This seems more related to an API issue where the upload date is not getting returned.
Do you have a request ID you could share so I could lookup the logs?
I have the same issue using Python SDK
This is one of the request IDs for your reference Hx6JyddZIhT17yuG1mVndA