Analystics script google in template, does n´´t work ?

GK User
Mon Jan 09, 2012 10:32 am
Hi, i have a problems with google analitycs code in the template.

When I paste code (script) from google site to template manager / features / <option add rule >, my google analitysc dont see my site.


What is wrong ?
User avatar
Senior Boarder

GK User
Mon Jan 09, 2012 11:40 am
Hi,

Try adding the code to bottom of this file instead: \templates\gk_appsite\layouts\blocks\footer.php
User avatar
Platinum Boarder

GK User
Mon Jan 09, 2012 1:23 pm
Hi Don Lee,
Thnaks for the reply , but when I put the code into footer.php I''ll get the text of the script in the footer

tried it between <div> ...</div> but no lock

the script is

var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'xx-123456789-1']);
_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);


Would be great if you can help me further !
User avatar
Senior Boarder

GK User
Mon Jan 09, 2012 1:31 pm
Found it :-)

forgot the <script> command''s
User avatar
Senior Boarder

GK User
Tue Jan 10, 2012 7:48 am
Yes, the code is supposed to be between <script> tags. Does it work now?
User avatar
Platinum Boarder


cron