Your smartphone tracks and remembers your every move. If you're concerned, there are ways to stop it from tracking you.
Go to settings, click on privacy and then location services. If it's on, you could be shocked at how much it actually knows about you.
Go down the list of apps and turn off which apps you don't want to track you (or allow them to track you only while you're in the app). Also, delete any apps you are no longer using.
To prevent getting targeted by ads from retailers you walk by, you need to restrict location-based ads. Here is how you do that: When you're under location services just scroll down and tap system services and toggle the location-based i-ads to off.
To limit ad tracking, while you're still in the "Privacy" settings tap on "Advertising" and toggle the "Limit ad tracking" button to "On."
Now let's talk about where you've been, your phone pays attention and keeps track of every location you've visited. You might want to clear that history.
If you don't want to be tracked at all you can turn off "location services." Just remember apps like Yelp, Uber or Waze which need to see where you are, won't work if locations services is not turned on.
On the iPhone, go to Settings > Privacy > Scroll all the way down to System Services > Significant Locations > Scroll down to Clear History.
For Google and Android phones, go to Google Account > Location History > Date and Personalization and Web and App Activity to tweak and customize your setting.
You can also delete your location history in your Google Maps Timeline by clicking on the bin icon.
Here is also a step by step guide.
How to stop your smartphone tracking you