I think using AdCode will make it easy.
Just a small add-on.