“It is difficult to give a specific answer to such a general question.
Antenna is always a trade-off between cost/size/performance etc.
See
WP008: Antenna Selection Guide For ISM Bands
If there is room the bigger antenna is better
A 5/8 dipole is a very good antenna. (total length is 1.25*wavelength)
A quarter wave on a good ground plane is often a good compromise.
But is require that product have a decent ground plane and that housing is not too lossy.
Moving the antenna to outside of enclosure is always positive for range.”
Last Update: January 24, 2020
September 14, 2017 1388 Antenna Q&A