Need Affiliate ID to be embedded on a page dynamically

I'm using Prosite, New Blog Template along with your Affiliate plugin. Each time a new site gets created for someone the template gets duplicated as usual. On the bottom of the pages of each person's new site, I have their affiliate referral URL embedded in a link like: "http://mysite.com?ref=". How do I make it something like "http://mysite.com?ref=[affiliateid]" whereas [affiliateid] display the person's affiliate id on their site? I could not find a shortcode anywhere that does something as simple as this.