Google Analytics event tracking - max string length

↘锁芯ラ 提交于 2019-12-03 16:14:37

问题


I am using Google Analytics for tracking events in my Android App. My question is: is there a limit for the string length in an event? I have found nothing about this topic on Googles devguide site.

Best regards!

Edit: I tried it whith a string with 2000 characters - and it works. If you need more (I don't believe), than try it first.


回答1:


According to the official documentation,

  • Max Length for Event Category = 150 Bytes
  • Max Length for Event Action = 500 Bytes
  • Max Length for Event Label = 500 Bytes
  • For all other parameters, you can check in the same page.

Long text is automatically truncated according to this doc:

If any of the values are greater than the maximum lengths, they will automatically be truncated. If a multi-byte character exceeds the maximum length, the entire character will be truncated.




回答2:


Note that Google Analytics will give a 414 error and tell you that your string is too long, when in fact you've sent a malformed string. Just take a modest string and insert a few spaces to see for yourself.




回答3:


The maximum event label string length is 2048 bytes: https://developers.google.com/analytics/devguides/collection/protocol/v1/reference#maxlength



来源:https://stackoverflow.com/questions/12280993/google-analytics-event-tracking-max-string-length

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!