sam5863015
Posts: 0
Joined: Thu May 16, 2013 5:50 pm

Still having issues with google analytics

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

Alena Prykhodko
Posts: 0
Joined: Tue Apr 09, 2013 7:36 am

Still having issues with google analytics

Hello Sam!'

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

sam5863015
Posts: 0
Joined: Thu May 16, 2013 5:50 pm

Still having issues with google analytics

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

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

Still having issues with google analytics

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

Roger6240907
Posts: 0
Joined: Mon Sep 16, 2013 5:33 pm

Still having issues with google analytics

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

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

Still having issues with google analytics

Hi Roger,

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

Puneet Duseja
Posts: 0
Joined: Wed Apr 16, 2014 10:55 am

Still having issues with google analytics

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

Nikita
Posts: 0
Joined: Fri Feb 28, 2014 4:02 pm

Still having issues with google analytics

Hi,

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

Puneet Duseja
Posts: 0
Joined: Wed Apr 16, 2014 10:55 am

Still having issues with google analytics

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

Nikita
Posts: 0
Joined: Fri Feb 28, 2014 4:02 pm

Still having issues with google analytics

Please provide a public link to your project.

Return to “Issues”