How to stop a session in Google mobile analytics v2 for android without EasyTracker

后端 未结 3 1677
刺人心
刺人心 2021-02-14 01:52

I\'ve read the documentation on the GoogleAnalytics v2 website (I\'ve basically read all the pages from https://developers.google.com/analytics/devguides/) but was not able to f

3条回答
  •  既然无缘
    2021-02-14 02:43

    In GoogleAnalytics v2 they have new ways to start/stop the session.

    I have not seen your code of mTracker.setStartSession(true) and mTracker.setStartSession(false) used before.

    Now, if you don't want to use the EasyTracker methods you can start a new session by the following:
    mTracker.startNewSession("UA-xxxxxxx-x", 20, this);

    With the first input being
    (String uniqueGoogleAnalyticsKey, int autoDispatchTimer, Context this)

    To stop it: tracker.stopSession();

提交回复
热议问题