Hi,
I'm working on the migration project from adwords to googleads. Unfortunately, since there are very few examples this time around, which is honestly a huge problem (the vast no of examples for adwords was very beneficial), I'm kind of stuck.
From my understanding,
1) This step I believe is fine, since I can log it out :
OfflineConversionFeed feed = new OfflineConversionFeed();
feed.setGoogleClickId("");
//other fields like conversionTime etc etc
is to be translated to :
ClickConversion feed = ClickConversion.newBuilder()
.setConversionAction(StringValue.of(getProductName()))
.setConversionDateTime(StringValue.of(getLeadStartDate())))
.setConversionValue(DoubleValue.of(getRevenue()))
.setGclid(StringValue.of(getSubAffiliatesId()))
.build();
2) I feel this step is also fine cause I can see data correctly
eg of how data looks : conversions {
conversion_action {
value: "Upload"
}
conversion_date_time {
value: "00000000 000000 America/Los_Angeles"
}
conversion_value {
value: 0.0
}
}
UploadClickConversionsRequest clickConversionRequest = UploadClickConversionsRequest.newBuilder().addAllConversions(feedCollection).build();
Here, feedCollection is an ArrayList<ClickConversion> which is doing nothing but storing data from step (1)
3) I believe this step is also correct since I can log out data for this object.
ConversionUploadServiceClient conversionUploadServiceClient = googleAdsClient.getLatestVersion().createConversionUploadServiceClient();
4)
The problematic step, since I cannot log out any error related to this response object. Maybe my logging is wrongfully set? But I've set it to the recommended steps as shown here
https://github.com/googleads/google-ads-java/blob/master/README.md (see Request/Response Logging section)
Also if my logging has been setup incorrectly, how am I able to capture the other steps correctly?
I cannot provide any logs for step 4 unfortunately since I'm unable to capture it in the logs.
UploadClickConversionsResponse response = conversionUploadServiceClient.uploadClickConversions(clickConversionRequest); //clickConversionRequest is the object from step 2. I have also tried the 2nd method that has 2 parameters (customerId,List<ClickConversion>) but same result
Any ideas on how do I get this resolved? I'm guessing after this
5) (this step is still not done, but I guess this prototype should be fine?)
for(ClickConversionResult result : response.getResultsList()) {
log("something");
try {
for (GoogleAdsError error :
ErrorUtils.getGoogleAdsErrors(operationIndex, response.getPartialFailureError())) {
log("something")
}
} catch (InvalidProtocolBufferException e1) {
log("something");
}
++operationIndex;
}
Let me know if the question was obscure or vague, and I'll try and provide more depth and detail to it.