POST with +100 ecommerce products fails

197 views
Skip to first unread message

Teake Nutma

unread,
Jul 15, 2015, 4:09:26 AM7/15/15
to google-analytics-m...@googlegroups.com
Hi,

I ran into some unexpected behavior of the measurement protocol the other day. When posting purchases with less than 100 products everything works OK, but with 100 or more I'm getting back 400s instead of 200s. The debug URL also stops parsing the payloads at that stage. I've attached a Python script that demonstrates the problem.

This seems like a bug to me -- anybody know what's going on?

Btw, this might be related: https://groups.google.com/d/msg/google-analytics-measurement-protocol/yayofF5Nu3I/auGrZT-BV1cJ

Thanks,

Teake
measurementprotocoltests.py

Philip Walton

unread,
Jul 15, 2015, 12:57:20 PM7/15/15
to Teake Nutma, google-analytics-m...@googlegroups.com
I believe the maximum hit size (for POST hits) is 8K, but now that I'm saying that, I'm not seeing it documented anywhere.

Can you check if your failed hits have a payload size that large?

--
You received this message because you are subscribed to the Google Groups "google-analytics-measurement-protocol" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-analytics-measure...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-analytics-measurement-protocol/5689a74b-545d-43e5-be31-e5297c9810d0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Teake Nutma

unread,
Jul 16, 2015, 3:33:09 AM7/16/15
to google-analytics-m...@googlegroups.com
It seems you're right. The hits start failing when their payload is above 8K. I also couldn't find any documentation on this.
It's a shame the debug URL also stops working above this limit -- a 'payload too big' message would be much more helpful.

Philip Walton

unread,
Jul 16, 2015, 1:45:16 PM7/16/15
to Teake Nutma, google-analytics-m...@googlegroups.com
Agreed, I'll see if I can fix both of these problems.

Perry Scopix

unread,
Jul 17, 2015, 3:40:45 AM7/17/15
to google-analytics-m...@googlegroups.com, teake...@gmail.com
Hi,

I believe this is documented here:


  • payload_data – The BODY of the post request. The body must include exactly 1 URI encoded payload and must be no longer than 8192 bytes.
Best regards,

Perry

Philip Walton

unread,
Jul 17, 2015, 2:24:41 PM7/17/15
to Perry Scopix, google-analytics-m...@googlegroups.com, Teake Nutma
Reply all
Reply to author
Forward
0 new messages