How to know which market(like Google's playstore) my user downloaded the application?

When user access to my service, they should send market information to my server. Currently I build 5 different applications for every 5 markets to do this.

Is there better way than this?