1

I am trying to receive referral parameters in google analytics account. But, it seems referrals are not received and the source and medium is direct\none.

try{
Bundle extras=null;
String referralString=extras.getString("referrer");
tracker.setReferrer(referralString);
}catch(Exception e){}

For the above code dummy parameters in the referral link are

source=sourcexyz
medium=referral
name=product.

Are, the above parameters okie? What am i missing? If the referrerString was wrong then i would get exception, but I am not getting any exception.

What are the preconditions to receive referral parameters in google anlytics account or Receieve data in referring sites, for android mobile device.

NNikN
  • 3,720
  • 6
  • 44
  • 86

1 Answers1

1

You'll need to register the receiver, AnalyticsReceiver.

You can see how to do that, and the different campaign parameters here - but setReferrer() may be enough depending upon what you are looking for.

CrackerJack9
  • 3,650
  • 1
  • 27
  • 48
  • but, why i can't see those campaign parameters in my account. Why i receive the installations as direct/none.My query not yet solved. – NNikN Aug 29 '11 at 18:57
  • did you do what I said, regarding the Receiver? Looked at the parameters at the site I linked? – CrackerJack9 Aug 29 '11 at 19:00
  • doesn't appear to be, the example is: (original referrer, e.g. google, citysearch, newsletter4) – CrackerJack9 Aug 29 '11 at 19:21
  • Now, I tell you wht parameters i have included, source as myCompanyName, medium is referral and campaign name is product. The market link is roughly as http://market.android.com/details=details?id="My Application Pacakge Name"&referrer=utm_source%3D"My company Name"%26utm_medium%3Dreferral%26utm_campaign%3Dproduct In my onReceive, i have set referrer using the code i mentioned above with GoogleAnalytics object. – NNikN Aug 29 '11 at 19:28
  • I want installation data i.e the referral data to be send when installation is done. i.e Only Once. – NNikN Aug 29 '11 at 19:33
  • save it as a preference, if the preference is already there, don't send it again. – CrackerJack9 Aug 29 '11 at 19:34
  • why do i use preference, as i want to send the data once after the application is downloaded and installed – NNikN Aug 29 '11 at 19:37
  • @CrackerJack9 have any idea i have posted my question is at http://stackoverflow.com/questions/10431018/how-to-get-referrer-using-google-track-in-android – Khan May 03 '12 at 12:44