What is the best practice?
Hi, @pradeep_07 -
AppMeasurement doesn't have an option to manually force a POST call. It will, however, automatically generate a POST call if the request size is greater than 2047 bytes.
While this would totally be an unsupported modification to the AppMeasurement.js library, and would require that any future updates to the library that you install on your site undergo the same modification, you could do a search for "2047" and replace both instances with a smaller threshold (2?) to ensure that all calls go out as POST rather than GET.
Hi @pradeep_07 ,
Based on my understanding, if there are more than 2047 characters in your Analytics server call then the server call automatically gets converted to POST but if you have less than 2047 characters in your request then the workaround would be to use Data Insertion API, which will allow you to send the data either in GET or POST calls. For more information on how to send the data in POST call, you can refer to the below documentation link.
Hope this helps.
If security is a concern for you, you can use this method, but make sure you read all the advantages and disadvantages of the method before making the changes.
Thank You, Arun.