Offline Conversions catching errors while processing records

205 views
Skip to first unread message

Thom Dunaway

unread,
Aug 31, 2015, 8:45:37 AM8/31/15
to AdWords API Forum
Hi,

I am trying to process offline conversions. I pull the records from my DB and then loop them...

foreach ($conversions as $conversion) {
   $gclid = $conversion["gclid"];
   $convDate = date("Ymd", strtotime($conversion["date"])). " 125959 -06:00";
   $convValue = isset($conversion["value"]) ? $conversion["value"] : 0;
   $offlineConversion = new OfflineConversionFeed($gclid, $conversionName, $convDate, $convValue);
   $operations[] = new OfflineConversionFeedOperation($offlineConversion, "ADD");
}
$output = $offlineConversionService->mutate($operations);
return $output;

In case you are wondering, I just have the date (YYYY-MM-DD), so I am faking the time. When I run this I get this:

An uncaught Exception was encountered

Type: SoapFault

Message: [OfflineConversionError.EXPIRED_CLICK @ operations[0].operand, OfflineConversionError.CONVERSION_PRECEDES_CLICK @ operations[1].operand, OfflineConversionError.EXPIRED_CLICK @ operations[4].operand, OfflineConversionError.EXPIRED_CLICK @ operations[6].operand, OfflineConversionError.EXPIRED_CLICK @ operations[5].operand, OfflineConversionError.EXPIRED_CLICK @ operations[3].operand, OfflineConversionError.EXPIRED_CLICK @ operations[2].operand]


I would like to mark these records as processed in my DB, so I am trying to figure out how to get the result of each Conversion ADD so I cam mark it as completed, or log the error. Help!


Thanks in advance for any help.


T



Anthony Madrigal

unread,
Aug 31, 2015, 4:48:28 PM8/31/15
to AdWords API Forum
Hi,

It seems that your error CONVERSION_PRECEDES_CLICK is occurring because the conversionTime is a time earlier than the time from the googleClickId. Please make sure that when you are setting the conversionTime to a time after the click. 

If you are still experiencing issues after this is done, please send me your SOAP request and response through reply privately to author, so that I could take a look. 

Regards,
Anthony
AdWords API Team
Reply all
Reply to author
Forward
0 new messages