Reputation: 12237
I've been having some trouble getting my referrer tracking to work with GA (Google Analytics) in my Android app. There isn't much info in the GA Doc. I am only using GA to track the referrer, by the way. Nothing else.
In my manifest file i have exactly this within the application tags:
<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>
I have then created a URL using the generator, tested it but still no stats are showing at all.
There was nothing else in the docs. Nothing to link this referral to my GA account, which I think is very strange. Is there something in my Activity that I have to write to send the referrer information to my GA account?
Upvotes: 2
Views: 913
Reputation: 40513
You need to add to your Activity:
GoogleAnalyticsTracker GATracker = GoogleAnalyticsTracker.getInstance();
GATracker.start("UA-XXXXXX-XX",20, this);
GATracker.trackPageView("Page-to-track");
Refer this for complete setting: Google Analytics SDK for Android
Upvotes: 4