ZT
The common term is "Thank God". Typically used when a tragedy or a bad situation is avoided. I suppose you could say, "thanks God" if you wish to direct the phrase to God himself.
Definition from Dictionary.com is; thank God, (used interjectionally to express relief, thankfulness, etc.) Also, thank goodness, thank heaven