- Add libGoogleAnalytics.jar to your project's /libs directory.
Add the following permissions to your project's AndroidManifest.xml manifest file:
<uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
Add the following code snippet to your project's AndroidManifest.xml manifest file:
<!-- Used for install referrer tracking --> <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>
But I never entered my UA-xxxxx-yy ID. The ID entered for Pageviews and Events tracking like this:
tracker.startNewSession("UA-xxxxx-yy", this);
Google Analytics for Android SDK ReadMe says: (NOTE: do not start the GoogleAnalyticsTracker in your Application onCreate() method if using referral tracking).
With referrer tracking where do i put my ID or not? If need, how? If not, why?