INSTALL REFERRER for Android App

Hey,
How do I get the play store GET parameters after the app has been installed? I found out that these are called App Preferences or Install Referrer. This will be used to track affiliates downloading the app from the Play Store.

Basically, from the play store URL : https://playstoreURL/?referrer=123yoyo , after installation I would need the value of referrer from the play store URL.