Use Google Analytics in Android

Source: Internet
Author: User
Google Analytics can be applied not only on websites, but also on Android applications. The following is an explanation:

1. Of course, you have registered a Google Analytics account and registered it for free.

2. Download the Google Android SDK for Android

3. Place the downloaded JAR file in the Lib package of the project.
4. Add Internet access permissions to your applications
5ProgramUsage in
Import com. Google. Android. Apps. analytics. googleanalyticstracker;
Create a tracker instance
Tracker = googleanalyticstracker. getinstance ();
Start tracker and update data every 30 seconds
Tracker. Start ("UA-12345678-9", 30, context );
Tracking page and stop
Tracker. trackpageview ("/helpscreen ");
Tracker. Stop ();
For more information, see the analytics SDK, which is very rich.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.