Luis Miguel Gutierrez Carril
Posts: 0
Joined: Thu Jul 30, 2015 9:57 pm

Google Analytics API - How hide alerts?

Hi, sorry for my English.

I followed the tutorial: "Using the Google Analytics API"

Everything works correctly and get trackings.

The problem I have is: I can not hide the warning message when you start running the Initialize GA javascript.

Image

I tried it with the command javascript .hide() on these alerts.
example:

[quote:]var gaSuccessHandler = function(result) { alert.hide('GA initialized: ' + result);
};

var gaNativePluginResultHandler = function(result) { alert.hide('Event tracked: ' + result);
};[/quote]Use the Appery.io Mobile Tester app, works and the alerts don ́t show.... but when I download the apk and run on android 5.0.1, calling this javascript GA it stops and closes app (FORCE CLOSE).

Android LOG:

Image
Image

How hide this alerts?

Serhii Kulibaba
Posts: 150
Joined: Tue Aug 27, 2013 1:47 pm

Google Analytics API - How hide alerts?

Hello Luis,

You have to remove all alert functions (codealert('GA initialized: ' + result);/code and so on)

Luis Miguel Gutierrez Carril
Posts: 0
Joined: Thu Jul 30, 2015 9:57 pm

Google Analytics API - How hide alerts?

  • This code works on Appery tester APP

  • But run APK on device FORCE CLOSE APP !!
    [quote:]var gaSuccessHandler = function(result){};
    var gaErrorHandler = function(error){};

var gaNativePluginResultHandler = function(result) {};

var gaNativePluginErrorHandler = function(error) {};

var getGAPlugin = function() {
if (GAPlugin) {
console.log('GA Plugin found');
return GAPlugin;
}
console.log('GA Plugin NOT found');
};

var initGA = function() {
console.log('Initialize GA');
if (getGAPlugin()) {
getGAPlugin().init(gaSuccessHandler, gaErrorHandler, "UA-55125887-2", 10);
}
};

var trackPage = function(pageName) {
console.log("trackPage: " + pageName);
if (getGAPlugin()) {
getGAPlugin().trackPage(gaNativePluginResultHandler, gaNativePluginErrorHandler, pageName);
}
};

var trackEvent = function(category, eventAction, eventLabel, eventValue) {
console.log("trackEvent: " + category);
if (getGAPlugin()) {
getGAPlugin().trackEvent(gaNativePluginResultHandler, gaNativePluginErrorHandler, category, eventAction, eventLabel, eventValue);
}
};[/quote]Image
Image
Image

Luis Miguel Gutierrez Carril
Posts: 0
Joined: Thu Jul 30, 2015 9:57 pm

Google Analytics API - How hide alerts?

Is there a possible solution ?

Any changes I make in the javascript "GA" causes or does not do tracking or force close app

Illya Stepanov
Posts: 0
Joined: Mon Mar 18, 2013 8:48 am

Google Analytics API - How hide alerts?

Hi Luis -

This is outside the scope of our support, but you should debug it more clearly with trace log - place brake points in your code to see where it crashes.

Luis Miguel Gutierrez Carril
Posts: 0
Joined: Thu Jul 30, 2015 9:57 pm

Google Analytics API - How hide alerts?

I've been reading and I found a reference to the error GA plugin on android Lollipop.

http://stackoverflow.com/questions/26530565/android-5-0-l-service-intent-must-be-explicit-in-google-...

Appery uses an older version of the plugin GA Version 2 http://oi58.tinypic.com/mt2czn.jpg

Is there any way to update the plugin? Is there any other code to run without using the ANALYTICS GA plugin?

Does your company is able to run an app on a device with android 5.0 with hidden alerts without force close this app?

Illya Stepanov
Posts: 0
Joined: Mon Mar 18, 2013 8:48 am

Google Analytics API - How hide alerts?

Thanks for pointing this out! Looks like we have outdated version of GA plugin. We’ll send this information to our developers team, hopefully we'll fix it in our future release versions.

Luis Miguel Gutierrez Carril
Posts: 0
Joined: Thu Jul 30, 2015 9:57 pm

Google Analytics API - How hide alerts?

Thanks for support. I look forward to updating the plugin

Alexis Revue
Posts: 0
Joined: Wed Jul 02, 2014 4:28 am

Google Analytics API - How hide alerts?

https://getsatisfaction.com/apperyio/...

How can we upload the new version of GA plugin?

Sam8264500
Posts: 0
Joined: Tue May 31, 2016 4:23 am

Google Analytics API - How hide alerts?

Any update on this??
I also have issues with ga plugin

I m using angularjs app

Return to “Issues”