Page 1 of 3

How to add Phonegap Google Analytics Plugin to Appery?

Posted: Wed Jul 03, 2013 1:16 pm
by Rahul Chidgopkar

Hi,

I want to add analytics to my Appery app. There is a google analytics phonegap plugin but I'm not sure how to add it to my project.

http://phonegap.com/blog/build/import...

Any tips? BTW, analytics is a pretty important requirement these days. Would be great if the Appery team writes a tutorial on it for everyone's benefit.

Regards,
Rahul.


How to add Phonegap Google Analytics Plugin to Appery?

Posted: Wed Jul 03, 2013 2:02 pm
by Maryna Brodina

Hello! Do you have html5 web or hybrid app?


How to add Phonegap Google Analytics Plugin to Appery?

Posted: Wed Jul 03, 2013 4:08 pm
by Kateryna Grynko

Hi Rahul,

Appery.io doesn't include PhoneGap Google Analytics Plugin by default. To use it export your app to IDE and add the plugin manually please.

You should remember that you can't import your app back to Appery.io after making changes. So I would recommend you to do it just before the app release.

If your app can work with Google Analytics classic JavaScript code you can paste that code into the Panel component.


How to add Phonegap Google Analytics Plugin to Appery?

Posted: Wed Jul 03, 2013 5:45 pm
by Rahul Chidgopkar

Hi Marina & Katya,

I'm building an Android app, not a web app. I don't want the hassle of exporting to IDE and adding a plugin separately.

If I add the GA JS code snippet in a panel component and build an apk file, will it work?

On a related note, any plans of adding analytics support (Google, Flurry, etc) to Appery in the near future?

Thanks,
Rahul.


How to add Phonegap Google Analytics Plugin to Appery?

Posted: Wed Jul 03, 2013 6:11 pm
by Kateryna Grynko

Hi Rahul,[quote:]If I add the GA JS code snippet in a panel component and build an apk file, will it work?[/quote]Yes, it will.
[quote:]On a related note, any plans of adding analytics support (Google, Flurry, etc) to Appery in the near future? [/quote]We don't have any information about this. Stay tuned for news.


How to add Phonegap Google Analytics Plugin to Appery?

Posted: Sat Nov 09, 2013 11:51 am
by MaratZhalbyrov

I added GA JS code snippet in a panel component and build an APK file, not work. Google analytics show me visits 0(zero).

Please help.

Thanks Marat.


How to add Phonegap Google Analytics Plugin to Appery?

Posted: Sat Nov 09, 2013 12:58 pm
by Alena Prykhodko

Hello! Please tell steps to reproduce.


How to add Phonegap Google Analytics Plugin to Appery?

Posted: Sun Nov 10, 2013 8:15 am
by MaratZhalbyrov
  1. Drag HTML Panel Component
    1. Paste into the Panel code(below) and try this code http://stackoverflow.com/questions/12...
    2. Build APK file and run on phone
    3. Check Google Analytics result. Unfortunly not working. Application not tracking.

How to add Phonegap Google Analytics Plugin to Appery?

Posted: Sun Nov 10, 2013 8:15 am
by MaratZhalbyrov

var _gaq = _gaq || [];
gaq.push(['setAccount', 'XX-XXXXXXX-X']);
gaq.push(['trackPageview']);

(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();


How to add Phonegap Google Analytics Plugin to Appery?

Posted: Sun Nov 10, 2013 8:16 am
by MaratZhalbyrov

var _gaq = _gaq || [];
gaq.push(['setAccount', 'XX-XXXXXXX-X']);
gaq.push(['trackPageview']);

(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();