I'm trying to implement Google Analytics Crashes/Uncaught Exceptions tracking using Google Tag Manager in Android & iOS. I'm able to track Caught Exceptions using the Exception tag avialable in GTM.
I have checked the reference guide for Android with no references related to exceptions.
EDIT: I have created a crash to check if it is reported or not
9052-9052/com.android.sample E/AndroidRuntime: FATAL EXCEPTION: main Process: com.android.sample, PID: 9052 java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.TextView.setText(java.lang.CharSequence)' on a null object reference at com.android.sample.MainActivity$1.onClick(MainActivity.java:61) at android.view.View.performClick(View.java:5242) at android.widget.TextView.performClick(TextView.java:10540) at android.view.View$PerformClick.run(View.java:21179) at android.os.Handler.handleCallback(Handler.java:739) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:145) at android.app.ActivityThread.main(ActivityThread.java:6873) at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1404) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1199)
I was thinking to push a dataLayer event when the app crashes however I wonder if developer will have control to push an event during/after the crash.
Please suggest if there is any way possible to track these things using GTM.