E-mail spam is practically a way of life in this day and age but that doesn’t mean we have to accept the way things are. That especially holds true for Google as the company recently outlined some measures they have taken to reduce spam by preventing hacks in the first place.

In a post on Google’s public policy blog, security engineer Mike Hearn highlighted the fact that most e-mail programs, including Gmail, are very good at detecting spammy messages and sending them directly to the recycle bin. As such, spammers began to change their approach in 2010 by hacking into Google accounts and sending customized messages to people on a user’s contact list.

These hijacking attempts peaked in 2011 but Google has been hard at work on the problem ever since. In fact, the search giant says they reduced the number of compromised accounts by 99.7 percent.

One big step in the right direction is the implementation of a system that performs a complex risk analysis each time someone logs into an account. The system checks more than 120 variables to help determine if it is really you that is logging into the account.

In the event that a login seems suspicious, Google may ask some simple questions to help determine if the correct person is logging in. Questions may include asking for the phone number associated with the account or the answer to a security question – questions a hacker likely won’t know the answer to.

The company recommends that users have a strong password and use two-factor authentication with Gmail. Additionally, it’s always a good idea to not reuse the same credentials for each site you have an account with.