Page 1 of 2

Google Analytics API - How hide alerts?

Posted: Tue Sep 01, 2015 3:17 pm
by Luis Miguel Gutierrez Carril

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?


Google Analytics API - How hide alerts?

Posted: Wed Sep 02, 2015 11:32 am
by Serhii Kulibaba

Hello Luis,

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


Google Analytics API - How hide alerts?

Posted: Wed Sep 02, 2015 2:01 pm
by Luis Miguel Gutierrez Carril
  • 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


Google Analytics API - How hide alerts?

Posted: Fri Sep 04, 2015 9:10 pm
by Luis Miguel Gutierrez Carril

Is there a possible solution ?

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


Google Analytics API - How hide alerts?

Posted: Sat Sep 05, 2015 4:56 am
by Illya Stepanov

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.


Google Analytics API - How hide alerts?

Posted: Sat Sep 05, 2015 11:34 am
by Luis Miguel Gutierrez Carril

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?


Google Analytics API - How hide alerts?

Posted: Sun Sep 06, 2015 1:59 am
by Illya Stepanov

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.


Google Analytics API - How hide alerts?

Posted: Sun Sep 06, 2015 6:44 am
by Luis Miguel Gutierrez Carril

Thanks for support. I look forward to updating the plugin


Google Analytics API - How hide alerts?

Posted: Wed May 18, 2016 9:20 pm
by Alexis Revue

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

How can we upload the new version of GA plugin?


Google Analytics API - How hide alerts?

Posted: Sun Aug 28, 2016 6:17 am
by Sam8264500

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

I m using angularjs app