kamal
Posts: 0
Joined: Tue Dec 30, 2014 5:46 am

Not showing information on google analytics site after implementing google analytics

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?

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

Not showing information on google analytics site after implementing google analytics

Hi Kamal -

We are sorry for such delay in answer.

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

Yurii Orishchuk
Posts: 0
Joined: Fri Feb 14, 2014 8:20 am

Not showing information on google analytics site after implementing google analytics

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.

Peter LPunkt
Posts: 0
Joined: Mon Jan 13, 2014 3:07 pm

Not showing information on google analytics site after implementing google analytics

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.

Evgene Karachevtsev
Posts: 12
Joined: Mon Apr 28, 2014 1:12 pm

Not showing information on google analytics site after implementing google analytics

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...

Asif
Posts: 0
Joined: Tue Aug 13, 2013 12:56 pm

Not showing information on google analytics site after implementing google analytics

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?

Yurii Orishchuk
Posts: 0
Joined: Fri Feb 14, 2014 8:20 am

Not showing information on google analytics site after implementing google analytics

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.

Peter LPunkt
Posts: 0
Joined: Mon Jan 13, 2014 3:07 pm

Not showing information on google analytics site after implementing google analytics

Hi Evgene,

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

Peter LPunkt
Posts: 0
Joined: Mon Jan 13, 2014 3:07 pm

Not showing information on google analytics site after implementing google analytics

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

Yurii Orishchuk
Posts: 0
Joined: Fri Feb 14, 2014 8:20 am

Not showing information on google analytics site after implementing google analytics

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.

Return to “Issues”