Page 1 of 2

Still having issues with google analytics

Posted: Sun Jul 28, 2013 1:10 am
by sam5863015

I posted a question a while back regarding google analytics, I was told to follow this https://getsatisfaction.com/apperyio/... but I am still having issues.

Firstly what is a pannel component? and next where do I enter the google script. I am new to coding so if you dont mind please explain it as if you were telling a child. Thank you


Still having issues with google analytics

Posted: Sun Jul 28, 2013 2:44 am
by Alena Prykhodko

Hello Sam!'

Tab Components- drag and drop Panel component (one from the buttom row)- Properties- edit HTML- go tab HTML Source and paste code.


Still having issues with google analytics

Posted: Sun Jul 28, 2013 1:29 pm
by sam5863015

Ok thank you for your help, I take it I will have to repeat this on all pages?


Still having issues with google analytics

Posted: Mon Jul 29, 2013 12:40 pm
by Maryna Brodina

Hello! Please try to do it without Panel component. Create JS asset with the code suggested here http://stackoverflow.com/questions/12...


Still having issues with google analytics

Posted: Thu Oct 24, 2013 6:47 pm
by Roger6240907

Maryna,
once I put that code inside a JS Asset, how do I trigger it? Should I wrap it inside a function googleAnalytics that I trigger in every page_show event?

Thanks


Still having issues with google analytics

Posted: Thu Oct 24, 2013 7:39 pm
by Kateryna Grynko

Hi Roger,

Yes, you should wrap it in a function and run this function where needed.


Still having issues with google analytics

Posted: Thu May 01, 2014 9:28 am
by Puneet Duseja

HI,
I added this to a page on load and also on tried on page show, but its not working.


Still having issues with google analytics

Posted: Thu May 01, 2014 11:15 am
by Nikita

Hi,

What did you add? Are there any errors in browser console?


Still having issues with google analytics

Posted: Thu May 01, 2014 11:20 am
by Puneet Duseja

HI,
I added the below code. page load went into a loop. :-), also tried adding this into start page html, but it did not work.

var _gaq = _gaq || [];
//Note "UA-17112306-1" - should be your value.
gaq.push(['setAccount', 'UA-XXXXX']);
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);
})();


Still having issues with google analytics

Posted: Thu May 01, 2014 11:33 am
by Nikita

Please provide a public link to your project.