If you live he will just stay with you (he's in Witch Hunt or at least there is A dog in it). If you die its persumed that he stays with one of the companions, whom ever you are closest too. I was with Leilana when I died so I like to think he went with her.
His Codex entry in Witch Hunt says he was left in Denerim for a bit to help him re-populate the Mabari breed. Then he rejoins you when you search for Morrigan. Prior to Witch Hunt I just assumed Sten whisked him away >.>
"Obscure allusions to chess are fine;but it troubles me that anonymous oracles know more of my business than I do"