Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3760890
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T10:32:29+00:00 2026-05-19T10:32:29+00:00

I am attempting to get Android Referral tracking to work. I am following the

  • 0

I am attempting to get Android Referral tracking to work. I am following the only documentation I have found here http://code.google.com/mobile/analytics/docs/android/#referrals I have the following in my android manifest file

<receiver  
android:name="com.google.android.apps.analytics.AnalyticsReceiver"  
android:exported="true">  
    <intent-filter>  
                <action android:name="com.android.vending.INSTALL_REFERRER" />  
        </intent-filter>  
</receiver>  
<receiver android:name="com.package.Receiver" android:exported="true">  
        <intent-filter>  
                <action android:name="com.android.vending.INSTALL_REFERRER" />  
        </intent-filter>  
</receiver>  
<uses-sdk android:minSdkVersion="4"/>  

com.package.Receiver starts with:

public void onReceive(Context paramContext, Intent paramIntent) {  
        String str1 = paramIntent.getStringExtra("referrer");  
        Log.i("myapp", "action: '" + paramIntent.getAction() + "'  
referrer string: '" + str1 + "'"); 

Also with a little bit of decompiling com.google.android.apps.analytics.AnalyticsReceiver has the following code in it:

public void onReceive(Context ctx, Intent intent)  
/*     */   {  
/*  24 */     String referrer = intent.getStringExtra("referrer");  
/*     */  
/*  26 */     if ((!  
("com.android.vending.INSTALL_REFERRER".equals(intent.getAction())))  
|| (referrer == null))  
/*     */     {  
/*  28 */       return;  
/*     */     }  
/*     */ 
/*  31 */     String formattedReferrer = formatReferrer(referrer);  
/*     */  
/*  33 */     if (formattedReferrer != null) {  
/*  34 */       PersistentEventStore store = new  
PersistentEventStore(ctx);  
/*  35 */       store.setReferrer(formattedReferrer);  
/*  36 */       Log.d("googleanalytics", new  
StringBuilder().append("Stored   
referrer:").append(formattedReferrer).toString());  
/*     */     } else {  
/*  38 */       Log.w("googleanalytics", "Badly formatted referrer, ignored");  
/*     */     }  
/*     */   }  

Note the two lines 36 and 38 that Log “googleanalytics” I have tried pushing the above app to the market, downloading it on my Nexus One (after uninstalling a previous version of the app). I have generated a link using the google page I linked to at the beginning of this post

http://www.google.com/url?sa=D&q=http://market.android.com/search%3Fq%3Dpname:com.package.app%26referrer%3Dutm_source%253Dgoogle%2526utm_medium%253Dcpc%2526utm_term%253Drunning%25252Bshoes%2526utm_content%253Dcontent1%2526utm_campaign%253Dslogan&usg=AFQjCNFctwqk1WgWl0bhiIBNVqy3U4OPRw

I attached logcat to my Nexus One while I download the app from that link, I do not see any logs from “googleanalytics” or “myapp”. The rest of the google analytics library does work for my app. I.E. I see records on google analytics about pages hits etc. However all the traffic sources are “Direct Traffic”. I am at a loss as to what is going on. Does anyone
have any insight into what I might be doing wrong?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-19T10:32:29+00:00Added an answer on May 19, 2026 at 10:32 am

    As is often the case I found my own answer. My problem was in my AndroidManifest.xml

    I had the following in my manifest:

    <manifest>
        <application>
        </application>
        <receiver>
        </receiver>
        <uses-sd/>
     </manifest>    
    

    The receiver tag was in the wrong spot. It should look like this

    <manifest>
        <application>
            <receiver>
            </receiver>
        </application>
        <uses-sd/>
     </manifest>  
    

    I am now seeing the logs I expect to when I install the app. In a few hours hopefully Google Analytics will have the data as well.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i am attempting to get my android app to work on both phone type
I'm attempting to get a Oauth2 token for Google Cloud Storage on Android using
I have the following bit of code, used on Android and tested quite extensively
Attempting to get Spring internationalization working. I have used classpath:messages basename, created .properties files
Im attempting to get a block of text from a file I have already
I am attempting to get rails routes paths via nested resources. I have looked
I have been attempting to get log4net logging in my asp.net web application with
I am attempting to get the string representation of an Android device's current WiFi
I am attempting to use a custom font for a TextView on Android, following
I'm creating my first android app (or attempting to anyway) and i have a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.