No one likes to be spied on, but in a world where we are increasingly connected through smartphones, apps, social media, games consoles, and even cars, we are piping more and more of our data across the internet and into online services.

Unless you're using a tool to cover your tracks, making use of encrypted services, or delving into the dark web, then more often than not your browsing data, personal information and even messages can all be tracked and used by various companies from Google through to dubious advertising services.

You can put a stop to a good bit of this tracking through tweaking privacy settings and locking down the data you put on the web. But things get a bit complicated when governments and their law enforcement agencies decide they want more information on you.

And the UK government can do exactly that thanks to the Investigatory Power Bill, which was made into a Act and thus part of British law in November 2016.

The Investigatory Powers Act essentially allows government agencies and authorities to intercept and collect your various communications data without your knowledge, and pressure telecoms companies and online services to give up datasets to aid with criminal investigations.

It's bad news for people who value privacy and the idea of a government that looks out for its citizens rather than looks at them. But first a brief history lesson.

Commonly referred to as the Snooper's Charter, the Investigatory Powers Act started life in 2012 as the Draft Communication Bill proposed by now Prime Minister Theresa May, who was the Home Secretary at the time.

The bill proposed legislation that would force Internet Service Providers (ISPs) and telecoms operators to maintain records of their customers' internet browsing activities, emails, voice calls, mobile messaging, and even online gaming, for 12 months.

By having access to such data, law enforcement agencies would have more scope and information to tackle serious crimes and terrorism, though it could also be used for minor crimes like petty theft and fly tipping.

The Bill was originally set to become a law in 2014 during the coalition government, but the Liberal Democrats managed to block it at the time due to concerns about how much power the Snooper's Charter had to snoop without many limitations and oversight.

Fast forward to 2015 and with a majority Conservative government, Theresa May was able to introduce a less stringent, more considered, but still powerful tool in the form of the Investigatory Powers Bill. It gained Royal Assent and was made a law on the 29 November 2016. Essentially, it was the Snooper's Charter 2.0.

That depends on how much you value your online and communications privacy. Under the Investigatory Power Act, the government can legally hack your computer or phone to monitor your internet browsing activities, messages and voice calls without your knowledge, providing it has a reason to do so, such as investigating a serious crime. If a warrant is granted the Metropolitan Police for example could bug your phone or crack into your computer.

Encryption can go some way to keep you safe, but the Investigatory Powers Act gives the authorities the scope to force internet and communications companies to unlock the encryption on their apps and services and allow government agencies to access targeted accounts.

That doesn't mean the government will be able to stop companies like WhatsApp from using encryption, but the law does allow agencies to force the removal of encryption to accounts and communications relating to a criminal investigation.

This part of the law is still being worked out in how communications and internet organisations will be made to lift their encryption or indeed if secure message services like Apple's iMessage will be forced to have a backdoor that bypasses encryption built into UK versions of them.

Now if you're a law abiding citizen you might be not be too concerned about being in the spotlight of the government's legal hackers and law enforcement.

But the Snoopers Charter goes further than that.

The law now enables government authorities to once again force ISPs and other communications companies to collect the web browsing records of all of their customers dating back to 12 months, kept for access by government authorities on the submission of a warrant.

In practical terms, this mean the government could have access to records of your IP address and a list of all the websites and domains you visited with the time and date you accessed them. Specific web pages you have looked at won't be available to the government, but the data collected should give it a pretty good idea of what you've been looking at and when.

Not only could this be seen as the government having the ability to infringe upon your online privacy, but it also means ISP and communications companies have more of your data to securely store.

This is an issue as various data breaches and hack attacks that have come to light over the past 12 months show that large databases of private information are often in the sights of hackers. Companies therefore will need to have robust security which they will have to pay for and as a result could see the prices of online services go up.

However, the potential for government data collection doesn't end there; the Investigatory Powers Act also allows law authorities to request internet and communications companies to hand over large bulk sets of customer data in order to aid an investigation.

Bulk data could include, for example, large numbers NHS medical records or tax history, as well as internet browsing data, and includes data related to a large number of people rather than targeted individuals. As such, your data could end up being sifted through by a government agent as part of an operation to tackle a terror threat or investigate a serious crime, even if you are in no way involved.

The powers the Investigatory Power Act gives the government for snooping on large amounts of people is worrying, and could see you, through your data, being effectively spied upon in the same way as someone who's a potential threat to national security.

And there's an argument that government authorities could abuse these powers and obtain all manner of data that may not be explicitly useful for an investigation or access data through dubious requests.

For people concerned about their privacy, bulk data collection can be seen as a potential major breach of their communications and internet freedoms.

So should you be yanking out your router cables and throwing your phone down the toilet? Well not quite yet.

The Investigatory Powers Act comes with a good number of safeguards to hold government authorities back from carrying out data collection at will. For a start, a warrant needs to be approved by the Secretary of State and a judicial commissioner for searching information and approving communications interception, which should in theory prevent unchecked surveillance.

But that does hang on what judges and the Secretary of State deem is appropriate data collection, and there's potential that some warrants could be rubber stamped for the collection of data that may not be wholly necessary to tackle an crime or aid an investigation.

To help avoid this the government has appointed its first Investigatory Powers Commissioner to establish a form of oversight into how the Investigatory Powers Act is being used, which should deter law enforcement agencies from abusing their snooping powers, particularly as it's now officially an offence for a public authority to unlawfully obtain communications data.

The Act also forces authorities to first make sure there's no way they can get the information they want for an investigation without intercepting or collecting private data, which forces them to weigh up infringing a person's privacy against protecting the public before making use of the the Act's powers.

And when they do make a data request, government authorities need to ensure that the only data they require is relevant to crime fighting operations and investigations, which should help keep the privacy infringement potential of mass data collection in check.

Without a doubt the Investigatory Powers Act is a powerful tool for the government and has the potential to erode your online and communications privacy.

How much this potential is realised has yet to be seen and whether this worries you is down to how concerned you are about privacy; are you happy letting the government know your browsing history if its combatants terrorism, or is giving up such privacy playing into the hands of terrorists?

It's worth noting the government is more than likely not concerning itself with the data of law abiding British citizens at the moment, and there's a change that many of us are already being snooped on by a whole variety of online services we use, with our data being used for marketing and analytical purposes.

And through social media many people have already wilfully published a plethora of personal information online for others to see, so you're more likely to be snooped on by old school friends than MI5 agents.

But for people truly concerned about government spying, there are tools such as virtual private networks (VPNs) and proxy servers that can go a long way to hiding your internet browsing and online activity from all manner of prying eyes.