开发者

Google Analytics Referrer issue in android

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" />

        </inte开发者_Python百科nt-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?


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜