Google Analytics in Template

ackers88 / 2011-07-12 14:57:15   

I have replaced the sample theme with eatock theme. When I go to pasta in my google analytics code into the index.php file, there is no < / h e a d > tag for me to place it above. Any ideas?

ashertob / 2012-08-07 00:16:45   

Hey, all -

I can't get google analytics to work. I paste the code in the appropriate place in the index.php file within the default folder (the template, right?) and seems to mess up the function of the site. Any thoughts?

Thanks.

Vaska A / 2012-08-07 00:26:58   

What is your site?

dloveusa / 2012-08-22 02:10:02   

ndxz-studio/site/sample/index.php

can you please provide the path within indexhibit2?

dloveusa / 2012-08-22 02:32:28   

retract

ndxzsite/default/index.php

merlalaguna / 2012-11-01 15:36:54   

Vaska A
I know this post its old but I have read all related topics I found
But the google analytics still not working

I put the tracker code inside the index.php before the closing tag i also tried to put it at the begining of the or before the tag

in the following directory
/ndxz-studio/site/sample/

I have triple checked that the site its on sample modality
but still not working..

Following the other directions in google i have created a PHP file named "analyticstracking.php" with the tracking code and put it in the soot directory .

then I tried to add the following line ( ) where i am not sure whic part of the line should be added, with the question marks or not,
I put it to the root/index.php file but It makes the website stop working

... any clue???
Something that could be wrong??

This is the code in the /ndxz-studio/site/sample/index.php
perhaps someone knows what #$%"#$ its happening :/

thanks!!



:









path = '/files/gimgs/';

$(document).ready(function()
{
    setTimeout('move_up()', 1);
});



var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'MY CODE']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'ssl' : 'www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();





    
    





merlalaguna / 2012-11-01 15:38:12   

from the last post my website frozenme.com

arsondpi / 2012-11-01 15:57:37   

Did you add the site in Google Analytics? You should login there and add the site etc.

ps. use code tags in the forum or just the bits of code needed for us to understand...

merlalaguna / 2012-11-01 16:38:10   

yes I add the site in google analythics indeed I have the code genereted by google analythics

Sorry last post I forgot to put the code tags before the code
should I erase the website and enable it again in google analythics?

thanks for the reply

  1. <script type="text/javascript">

var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-243455my-code']);
_gaq.push(['_trackPageview']);

(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'ssl' : 'www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();


arsondpi / 2012-11-01 17:32:24   

you are supposed to edit the index.php (Admin->Assets-> Template->index.php) file and include the google analytics code.
Don't include this in your text area...

merlalaguna / 2012-11-01 19:06:52   

OOOOOOOOOOOOOOOOOOOOOOO MADONNNNNAAAA finally!!! thanks thanks thanks

this things are so confusing

thanks a lot now its working...

This thread has been closed, thank you.