The way this happens is linked to how you access websites from your mobile phone, researchers said.
Steven Englehardt and Arvind Narayanan from Princeton University in the US claimed to have found two examples of scripts actually designed to track people through their battery life.
One of them "retrieves the current charge level of the host device and combines it with several other identifying features," they said.
Researchers were able to 'fingerprint' devices by using charge level, charging status and internet protocol (IP) address.
The software which allows you to load a website is able to see what is the battery status of your device, known as battery status application programming interface (API).
This allows the possibility of positive things, such as loading a more basic site if someone has very low levels of power, 'metro.co.uk' reported.
However, it could also see other things which you are searching, researchers said.
If you visit a website while having low battery levels on your phone, the site picks this up and gives you a less complicated version to try and save your battery.
If you then open a different website using a private browsing mode piped through a secure virtual private network (VPN), it could still be possible to connect your phone to both of those websites, if both of them had the same advertisement on the page, researchers said.
The longer you spent on the websites, with battery draining at the same level for both pages, the more clearly the two would be linked, they said.
According to security expert Lukasz Olejnik, companies could potentially use the information to manipulate you into buying things you would not normally buy.
"When battery is running low, people might be prone to some - otherwise different - decisions. In such circumstances, users will agree to pay more for a service," he said.