OfflineConversionsFeedService DateError.INVALID_STRING_DATE_TIME

200 views
Skip to first unread message

VJ

unread,
Dec 30, 2015, 4:47:24 PM12/30/15
to AdWords API Forum
Hi,

I am using latest adwords api v201509 PHP library.

This is my request :

 <SOAP-ENV:Body>
    <ns1:mutate>
      <ns1:operations>
        <ns1:operator>ADD</ns1:operator>
        <ns1:operand>
          <ns1:googleClickId>CI6mu4LRg8oCFdgYgQod6aEO5gVij</ns1:googleClickId>
          <ns1:conversionName>From Doc to PDF - PRIVATE 248050 - US - IE FF - (Y6xdm981)</ns1:conversionName>
          <ns1:conversionTime>2015-12-29 19:56:40</ns1:conversionTime>
          <ns1:conversionValue>1.6</ns1:conversionValue>
        </ns1:operand>
      </ns1:operations>
    </ns1:mutate>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

I am passing conversion time correct only still i am getting error ::  DateError.INVALID_STRING_DATE_TIME

Can you please help how to resolve this error.?


My PHP request array is this:


$date1 = strtotime('2015-12-30T04:56:40.587');

date_default_timezone_set("America/Dawson");

$request_data = array(array('ConversionName'=>'From Doc to PDF - PRIVATE 248050 - US - IE FF - (Y6xdm981)',
            'ConversionValue'=>'1.60',
            'ConversionTime'=>date("Y-m-d H:i:s",$date1),
            'Gclid'=>'CI6mu4LRg8oCFdgYgQod6aEO5g'));

If possible please let me know what I am doing wrong here?

Umesh Dengale

unread,
Dec 30, 2015, 5:16:33 PM12/30/15
to AdWords API Forum
Hello,

Thanks for providing the SOAP request and code snippet. Please note that a timezone is always required when creating an OfflineConversionFeed object (see our Date and Time Formats and Timezones pages). 

Regards,
Umesh, AdWords API Team.

Umesh Dengale

unread,
Jan 4, 2016, 2:34:31 PM1/4/16
to AdWords API Forum
Hello,

Yes, you are correct. OfflineConversionError.CONVERSION_PRECEDES_CLICK error occurs when the conversion is reported to have happened before the click. You can look up the time zone of a customer using the CustomerService. The Customer object has a dateTimeZone field which includes this information. You can compensate for this by either converting your times to customer time zone (to match the API). e.g. Let's say that your account is set up to use Eastern time. A user clicks an ad at 6:00 Eastern time, and the time of the GCLID is recorded as 6:00. Your servers, in Pacific time, record the page hit at 3:00 (due to the 3-hour difference). The user finishes converting by 4:00 Pacific time (7:00 Eastern time). When you upload the conversion, if you just say 4:00, you will get a CONVERSION_PRECEDES_CLICK error. 

Thanks,
Umesh, AdWords API Team.

Umesh Dengale

unread,
Jan 7, 2016, 4:03:43 PM1/7/16
to AdWords API Forum
Hello,

Thanks for providing the code snippet. Please check the time zone of a customer using the CustomerService and compensate for this by either converting your times to customer time zone (to match the API). 
Could you tell what is field report_conversion_time represent and date format (mainly timezone) 2015-12-18T05:29:44.22 it uses?          
Reply all
Reply to author
Forward
0 new messages