Google Play Campaign Attribution
The link contains an encoded referrer parameter. After installation, the app can securely retrieve it through the current Google Play Install Referrer API, together with click and install timestamps and the installed version.
For Kotlin and Java, Google recommends the Play Install Referrer client library. Query it once on the first launch after installation and store the result: the information remains available for 90 days and changes only after a reinstall.
The old com.android.vending.INSTALL_REFERRER broadcast and Google Analytics Android v3 SDK are no longer the implementation model.
Add a referrer parameter to any URLs that will be linking directly to Google Play Store and set the value of that parameter to a string of Google Analytics campaign parameters that describe the source, as in this example:
https://play.google.com/store/apps/details?id=com.example.app&referrer=utm_source%3Dgoogle%26utm_medium%3Dcpc%26utm_term%3Dpodcast%252Bapps%26utm_content%3DdisplayAd1%26utm_campaign%3Dpodcast%252Bgeneralkeywords
Remeber: Google Analytics is case sensitive, so don't duplicate UTM parameters in uppercase or lowercase. Use always the same namespace.
Finally don't use "/" slash character in your UTM parameters, slash is used to separate paths and it can cause problem or error during Analytics recognition data.