If the app is not picking up all of your laps, has very laggy or incorrect speeds, and/or shows the map plot going off course, then that's almost certainly a GPS reception issue. Many reception issues can appear ok when stopped or moving slowly, and may only become evident when the vehicle is driven at track speeds, so it's best to optimize reception as much as possible from the start.
The first step is to try to improve what you already have... Although the phone's internal GPS can be a bit difficult at times or in certain situations, many users are able to get some usable data and lap timing with this by optimizing the phone's placement in the vehicle so that it has a large clear line-of-sight to the sky, while minimizing any metal or electrical interference sources near it. Usually, a good sturdy windshield mount works well for this. If the phone has a metal roof above it or is near a roll cage, that often adds some reception difficulty.
With some phones, vehicles, track locations, or atmospheric conditions, this may not always be enough... In that case, and for committed users in general, we recommend using a compatible external GPS device, such as an XGPS160 (iOS and Android) or a Qstarz BT-Q818XT (Android only), ensuring that it is paired to your phone and that the app is set to use it (see the GPS mode under the Options screen), then securely placing it where it will have optimal reception. These often perform much better under difficult reception conditions and can provide more accurate data and a higher sampling rate as well.