Hi,
Previously,
1) I used to use OfflineConversionFeed for setting data (setConversionName, setGoogleClickId etc).
This is now replaced by ClickConversion feed = ClickConversion.newBuilder()
.setConversionAction(StringValue.of(e.getName())).build() //ofcourse adding all parameters such as gclid, conversionTime etc
2) For creating the uploadRequest :
UploadClickConversionsRequest clickConversionRequest = UploadClickConversionsRequest.newBuilder().addAllConversions(feedCollection).build(); //feedCollection is just an arrayList of ClickConversion and the data is from point (1)
3) For creating the client :
ConversionUploadServiceClient conversionUploadServiceClient = googleAdsClient.getLatestVersion().createConversionUploadServiceClient();
--This is where the problem starts--
4) UploadClickConversionsResponse response = conversionUploadServiceClient.uploadClickConversions(clickConversionRequest);
a) I am unable to log any failure for this step, the job kind of just hangs? I have waited about 1-2 mins, but I'm just restricting it to 5 entries, so 1-2 mins seems high, so I DONT THINK time is an issue.
c) I have tried using the second method accepting parameters (customerId,List<ClickConversions>), but the problem persists.
Am I going the right way? How do I call the mutate method? Since there are no examples, this is getting really inconvenient.
This is the exact thing that I'm trying to refactor (the example is from your sample in adwords). There a lack of usage documentation which is making it difficult.
// Get the OfflineConversionFeedService.
OfflineConversionFeedServiceInterface offlineConversionFeedService =
adWordsServices.get(session, OfflineConversionFeedServiceInterface.class);
// Associate offline conversions with the existing named conversion tracker. If this tracker
// was newly created, it may be a few hours before it can accept conversions.
OfflineConversionFeed feed = new OfflineConversionFeed();
feed.setConversionName(conversionName);
feed.setConversionTime(conversionTime);
feed.setConversionValue(conversionValue);
feed.setGoogleClickId(gClid);
OfflineConversionFeedOperation offlineConversionOperation =
new OfflineConversionFeedOperation();
offlineConversionOperation.setOperator(Operator.ADD);
offlineConversionOperation.setOperand(feed);
OfflineConversionFeedReturnValue offlineConversionReturnValue = offlineConversionFeedService
.mutate(new OfflineConversionFeedOperation[] {offlineConversionOperation});