adwords api DATE TIME problem

1,584 views
Skip to first unread message

Bezecom Voip

unread,
Jun 9, 2014, 8:11:14 AM6/9/14
to adwor...@googlegroups.com

Hi

I'm using the adwords api to upload offline conversions. (v201402- C# .NET app)

I'm having trouble with the conversionTime value.

I keep getting this error whenever i try uploading any value: 

 

DateError.INVALID_STRING_DATE_TIME @ ; trigger:'20145826 115829'

 

 

As you can see the time is not in the future and it is correct. t tried also all the formats as describded at the manual: 

  1. MM/dd/yyyy hh:mm:ss aa
  2. MMM dd,yyyy hh:mm:ss aa
  3. MM/dd/yyyy HH:mm:ss
  4. yyyy-MM-dd HH:mm:ss
  5. yyyy-MM-ddTHH:mm:ss

 

I tried them with TIMEZONE formatting (although its not required for the v201402 version), equal to my MCC account timezone. And still, i keep getting this annoying error.

Please help me to figure it out.

Thanks

Josh Radcliff (AdWords API Team)

unread,
Jun 9, 2014, 10:38:43 AM6/9/14
to adwor...@googlegroups.com
Hi,

That date string contains a month of 58. Did you intend to use 05 instead, or is that date/time string unrelated to what you passed in?

Also, note that a timezone is always required when creating an OfflineConversionFeed object (see our Date and Time Formats and Timezones pages).

Cheers,
Josh, AdWords API Team

Bezecom Voip

unread,
Jun 10, 2014, 4:14:31 AM6/10/14
to adwor...@googlegroups.com
Hi,
Thanks for the help Josh. I was able to make it work by adding the correct timezone.
I'm now facing another error :
INVALID_CONVERSION_TYPE
I've tried changing my clientCustomerId to the adwords clientCustomerId as described in other posts, didn't work.
Any idea? Thanks,

Josh Radcliff (AdWords API Team)

unread,
Jun 10, 2014, 9:12:01 AM6/10/14
to adwor...@googlegroups.com
Hi,

There are a few prerequisites that need to be met in order for you to upload an offline conversion for a click.

1. Before the click time, you must have at least one Conversion Type set up in your effective conversion account.
2. You must upload to a Conversion Type in the effective conversion account that was in place at click time. This means that if you want to use Conversion Types on your MCC (Cross-account conversion tracking), you need to go to the Conversions menu in My Client Center (as the MCC) and set the AdWords account's effective conversion account to the MCC on the Manage accounts tab before the click time.
3. The Conversion Type you upload to must be for offline conversions (an UploadConversion in the API).

Please check the above and let me know if that doesn't explain the error.

Thanks,
Josh, AdWords API Team

Bezecom Voip

unread,
Jun 10, 2014, 10:01:35 AM6/10/14
to adwor...@googlegroups.com
Hi Josh,
I have all what you mentioned set up correctly. still getting the same error?
Thanks,

Josh Radcliff (AdWords API Team)

unread,
Jun 10, 2014, 10:25:45 AM6/10/14
to adwor...@googlegroups.com
Hi,

Just to be clear - did you have all of that set up before the click time of the click you're uploading?

Thanks,
Josh, AdWords API Team

Bezecom Voip

unread,
Jun 11, 2014, 9:25:07 AM6/11/14
to adwor...@googlegroups.com
Hi Josh.
I waited till today to make sure. yes it is before the click time.
Still the same error

Josh Radcliff (AdWords API Team)

unread,
Jun 11, 2014, 12:19:16 PM6/11/14
to adwor...@googlegroups.com
Hi,

Waiting until today would not help if as of the click time you either:

a. Did not have at least one Conversion Type set up in your effective conversion account OR

b. You did not have the effective conversion account set to the MCC and you are trying to use cross-account conversion tracking

If that does not explain the error, please send over the request/response logs only to me by clicking Reply to Author and I'll investigate further.

Thanks,
Josh, AdWords API Team

Whatsome WithAll

unread,
Jul 16, 2014, 3:52:26 AM7/16/14
to adwor...@googlegroups.com

Hi

I'm using the adwords api to upload offline conversions. (v201402- C# .NET app)

I'm having trouble with the conversionTime value.

I keep getting this error whenever i try uploading any value: 

 

InnerException = {"[DateError.INVALID_STRING_DATE_TIME @ operations[0].operand]"}

I am using the following date format to upload the conversion.

string conversionTime = DateTime.Now.ToString("yyyyMMdd HHmmss Asia/Calcutta");

I also have tried with the following:

string conversionTime = DateTime.Now.ToString("yyyymmdd hhmmss tz");

But nothing is working. Please help me as I am really stuck into this.

NOTE : The strange thing on the other hand is this although I am getting the above exception, my conversion gets uploaded on my Adwords Account...!!!!!


Thanks

Sam

Whatsome WithAll

unread,
Jul 16, 2014, 6:19:34 AM7/16/14
to adwor...@googlegroups.com
HI There,

It seems that I am able to figure out this when I used the DateFormat as shown below:

string conversionTime = DateTime.Now.ToString("yyyyMMdd HHmmss") + " Asia/Calcutta";

But now I am getting another exception which is :

Failed upload offline conversions.[OfflineConversionError.UNAUTHORIZED_USER @ operations[0].operand].

I am using approved DeveloperToken with correct ClientID and ClientSecret. 
Moreover I can successfully refresh the AccessToken as well.

The only thing that is odd is that I am using "gclid" grabbed from other website for testing purpose.
It is : CjgKEAjwuMmdBRDljdfi2_qQpxkSJADDCRwsmhh3BniAB2uCXp6Aw6xON2s7f_wUW8nRKGemWrgTnvD_BwE

Does this "gclid" should also relate to my own MCC production account?

Thanks
Sam

Josh Radcliff (AdWords API Team)

unread,
Jul 16, 2014, 10:29:50 AM7/16/14
to adwor...@googlegroups.com
Hi,

I realize you figured out the date/time formatting, but just for reference you may want to bookmark the Date and Time Formats doc in my answer above.

The permission error means that although you may have a valid access token, that access token is not for a user who has permission to update the account. Please check the permissions of the AdWords account for the click ID and make sure that the access token user has permissions to that account.

In addition, I looked in our logs and it appears that you are not populating the clientCustomerId SOAP header. I would recommend setting this to the AdWords account for the click ID.
Reply all
Reply to author
Forward
0 new messages