title: how to get "referrer" from intent where user clicks on the referral link and opens the pre installed app from playstore
body: <p>The user has already installed the app via referrer link and installed the app.</p>
  
  <p>When the user clicks again the same referrer link it navigates to PlayStore with open option. The documents <a href="https://developers.google.com/analytics/devguides/collection/android/v4/campaigns" rel="noreferrer">Google Analytics Campaign</a> says <code>referring traffic sources or marketing campaigns may be attributed to user activity in subsequent sessions</code> under <strong>General Campaign &amp; Traffic Source Attribution</strong> </p>
  
  <p>When the user starts the app by selecting open option from PlayStore, I have tried to capture the referrer from intent as per the document as below,</p>
  
  <pre><code> Intent intent = this.getIntent();
   Uri uri = intent.getData();
  </code></pre>
  
  <p>The uri itself is <strong>null</strong>. How to know if user opens the app from PlayStore for first time onwards.</p>