Page 1 of 1

Not showing information on google analytics site after implementing google analytics

Posted: Thu Jan 08, 2015 12:19 pm
by kamal

I am implementing google analytics service to my app. I have read the documentation
http://devcenter.appery.io/tutorials/.... I have implemented the code which is in the doc. When I run my app into IPhone it alerts the message of GA initialized .Means it showing all alert succesfully. But when I go to google analytics site using my google login and shows dashboard then it does not showing anything.

Currently I am calling trackpage and trackevent method on button click using:

trackPage('Box');
trackEvent("Box", "Open", "times", 1);

And when I run my app into android phone then it does not any alert.It does not initialize google analytics plugin.

Can you suggest any idea?


Not showing information on google analytics site after implementing google analytics

Posted: Sun Jan 11, 2015 12:33 am
by Illya Stepanov

Hi Kamal -

We are sorry for such delay in answer.

Thank you for reporting this. We will test additionally this case.


Not showing information on google analytics site after implementing google analytics

Posted: Mon Jan 12, 2015 5:42 am
by Yurii Orishchuk

1 Create_new-javascript

2 Call this javascript smth like "googleAnalitic"

3 Paste your code to this file:

pre

var _gaq = _gaq || [];

//Note: you should replace this value with your personal site data.
gaq.push(['setAccount', 'UA-17912306-1']);
gaq.push(['trackPageview']);

//Add event handler on page show.
var onPageShow = function(){
//Track page into GA when it has been shown
gaq.push(['trackPageview', window.location.href]);
};
jQuery(document).bind("pageshow", onPageShow);

(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);
})();

/pre

Regards.


Not showing information on google analytics site after implementing google analytics

Posted: Thu Jan 29, 2015 6:41 am
by Peter LPunkt

Hi, i tried this code in a webapp hosted on heroku and it worked. Is there a reason, why analytics.js (the more recent google analytics script: https://developers.google.com/analyti...) shouldn't work? Perhaps you have tested this already...i will give it a shot sometime soon.


Not showing information on google analytics site after implementing google analytics

Posted: Fri Jan 30, 2015 7:23 am
by Evgene Karachevtsev

Hello Peter,

Could you please clarify, have you debugged your code?
These links may be helpful for you:
http://stackoverflow.com/questions/15...
https://developers.google.com/analyti...


Not showing information on google analytics site after implementing google analytics

Posted: Sat Feb 14, 2015 8:58 am
by Asif

Hi Yurii,
If I'll write the code which you have mentioned, then do i need to follow your tutorial also.
Also please tell me what do i have to write in place of ['_trackPageview'].

And in the tutorial I m not able to understand, how to use this open and close button events.

And since if i m running this analytics on my released app, so i'll not be able to put the alerts which you have mentioned in the ga.js
So still the analytics will be registered in the app?


Not showing information on google analytics site after implementing google analytics

Posted: Tue Feb 17, 2015 5:15 am
by Yurii Orishchuk

Hi Asif,

You don't need to follow tutorial also.

pre

Also please tell me what do i have to write in place of ['_trackPageview'].

/pre

You don't have to replace this part of code.

This code only track pages which user navigate through. But you can add any actions you need with following JS code:

pre

gaq.push(['trackEvent', 'someTestEvent', "someTestEventVal"]);

/pre

Regards.


Not showing information on google analytics site after implementing google analytics

Posted: Tue May 05, 2015 8:52 am
by Peter LPunkt

Hi Evgene,

just wanted to let you know, universial analytics (google's analytics.js) is working for pageviews and events in my webapp.


Not showing information on google analytics site after implementing google analytics

Posted: Wed May 06, 2015 12:34 pm
by Peter LPunkt

Hi Yurii,

is this code supposed to work for native android apps aswell?

Because i can't get tracking to work for my native app. I've tried the Phonegap Analytics Plugin (from tutorial), the new analytics.js and ga.js approach. Analytics.js and ga.js both work if i exported as website.

Are there additional steps to consider, to make this work? From my understanding, one issue is the phonegap file:/// protocol (as mentioned here: http://www.blastam.com/blog/index.php...).

I would like to hear your thoughts and suggestions. That would be very helpful!
Cheers


Not showing information on google analytics site after implementing google analytics

Posted: Tue May 12, 2015 1:58 am
by Yurii Orishchuk

Hi Peter,

Unfortunatly this code could not work in device. The reason described in your link.

Did you follow that link to get universal analitic work on your device?

Regards.