Android App Development
iOS App Development
Flutter App Development
Cross Platform App Development
Hire on-demand project developers and turn your idea into working reality.
Big thanks to Webkul and his team for helping get Opencart 3.0.3.7 release ready!
Deniel Kerr
Founder. Opencart
Top Partners
This is chapter-2 of “how to track your android application by GAv4″. In this chapter, I will show you how to track exception and crashes by GAv4.
Exception: An exception is a computational problem that occurs when any program executes. When an Exception occurs the normal flow of the program is an interrupt and the Application terminates abnormally.
Application Crashes: A Application crash is when a program of application stops functioning properly. Often it will exit the affected program after encountering this type of error.
If you are an app developer obviously your app will be used by many people, from many states and by many countries. And by some reason, the app crashes or got an exception then how do you know. And this is the major issue to track our app that when to get exception/crashes and wherein entire app.
So, For resolving that problem google analytics give us the method for tracking exceptions/crashes of your application.
By analytics, any Exceptions can also be tracked very easily. It permits us to track all the known exception which we tried to catch using try & catch block.
and in your application class use this method.
App crash recorded automatically by setting ga_reportUncaughtExceptions to true in app_tracker.xml.
Actually, we have to make our own app_tracker.xml file and replace it to the default global_tracker.xml
This is auto-generated XML file by analytics.
global_tracker.xml
to override default tracker file
make our tracker XML file in app -> res -> xml package
app_tracker.xml
ga_autoActivityTracking: If true, views (Activities) will be tracked automatically.
true
ga_reportUncaughtExceptions: Automatically track an Exception each time an uncaught exception is thrown in your application.
For more details about google parameters: goto the Google Analytics SDK v4 for Android – Parameters
And on the place of global_tracker.xml
write our app_tracker.xml file
App crash will be recorded and will be shown on Google Analytics dashboard.
Goto Behaviour -> Crashes and Exceptions section on the dashboard.
Both the Exception and app crash report normally takes 1 day to reflect on Google Analytics dashboard.
In above snapshot, I have intensely crashed my application in MainActivity.
And Analytics dashboard shows the report of crashes and exception.
Sources:
developers.google.com/analytics/
Previous Chapter
Your email address will not be published. Required fields are marked*
Name*
Email*
Save my name email and website in this browser for the next time I comment.
We use cookies to personalize your experience. By continuing to visit this website you agree to our use of cookies. Learn more about privacy policy
Name
Email
Subject
Enquiry or Requirement
If you have more details or questions, you can reply to the received confirmation email.