As said above it's already in the game. But for anyone wondering, there are certain things that the system knows already (like how many quests you've done, how many zones you've explored) and then there are things that the system doesn't know like how much gold you have looted or gained from questing, so those start at zero.
Also, the system will check things like loot that you have and set achievements for the bosses that the loot dropped from, for example, if you have the T4 helm it will give you the achievement for clearing Karazhan. On the flip side, I've completed all heroic dungeons with most of my chars and hardly any of them have the achievements for them as they don't have loot from the dungeons, or it's been replaced.