thanks to somebody/something
On account of; due to; because of. Thanks to John and his team, we managed to get the project finished on time. The bill was passed thanks to a handful of senators willing to cross party lines to support it.
thanks to someone or something
due to someone or something; because of someone or something. (This does not necessarily suggest gratitude.) Thanks to the storm, we have no electricity. Thanks to Mary, we have tickets to the game. She bought them early before they were sold out.
On account of, because of, as in Thanks to your help, we'll be done on time. This phrase alludes to gratitude being due to someone or something. It is also put negatively, no thanks to, meaning "without the benefit of help from," as in We finally found your house, no thanks to the confusing map you drew. This usage, first recorded in 1633, is about a hundred years older than the first term, recorded only in 1737.
thanks to somebody/something(sometimes ironic) because of somebody/something: We won the game thanks to a lot of hard work from everyone in the team. ♢ We lost the match, thanks to a few silly mistakes.
On account of; because of: "Thanks to a variety of domestic political changes, by the 1440s the Chinese had withdrawn from participation in the wider world" (Lincoln P. Paine).