Problem with analitycs

GK User
Sat Apr 14, 2012 4:12 pm
Hi, I want put the analitycs code not in the plugin of the template
but in the code.
I want konw if is true put the analutycs code in: /public_html/templates/gk_twn2/layouts/blocks/head.php

Thanks
User avatar
Senior Boarder

GK User
Sun Apr 15, 2012 8:52 am
Yes you can put analytics code in head.php file but why you don't use build in template feature where you can put only tracking code ?
User avatar
Platinum Boarder

GK User
Sun Apr 15, 2012 3:14 pm
Because I'm sure that if I use build in template feature, analitycs work bad. Don't counts all visitator!
So I want try to put it in the header where google raccomanded. I'ma sure of this, I have some article that
have 12.000 read and analitycs tell me only 400. Before that I cahang skin all work good so I think that the problem is in the position of the analitycs script.

Sorry for my bad english, I hope that you can undersand what I say
User avatar
Senior Boarder

GK User
Tue Apr 17, 2012 9:43 am
There is no way that code track not full data, but if you want to you need to add this code to this mentioned file.
User avatar
Platinum Boarder

GK User
Mon Apr 23, 2012 9:29 pm
bkrztuk wrote:There is no way that code track not full data, but if you want to you need to add this code to this mentioned file.


I can put the code also in - templates/gk_twn2/layouts/default.php at the end before the tag </body> ?
User avatar
Senior Boarder

GK User
Tue Apr 24, 2012 7:35 am
Once you find the code snippet, copy and paste it into your web page, just before the closing </head> tag*. If your website uses templates to generate pages, enter it just before the closing </head> tag in the file that contains the <head> section. (Most websites re-use one file for common content, so it's likely that you won't have to place the code snippet on every single page of your website.)

(http://support.google.com/googleanalyti ... wer=174090)

If you check the Google help pages you will know that the best place is before closing
Code: Select all
</head>
tag co before </body> place is not the best solution.
User avatar
Platinum Boarder

GK User
Tue Apr 24, 2012 11:58 am
bkrztuk wrote:
Once you find the code snippet, copy and paste it into your web page, just before the closing </head> tag*. If your website uses templates to generate pages, enter it just before the closing </head> tag in the file that contains the <head> section. (Most websites re-use one file for common content, so it's likely that you won't have to place the code snippet on every single page of your website.)

(http://support.google.com/googleanalyti ... wer=174090)

If you check the Google help pages you will know that the best place is before closing
Code: Select all
</head>
tag co before </body> place is not the best solution.


But is write also "
For the best performance across all browsers we suggest you position other scripts in your site in one of these ways:

before the tracking code snippet in the <head> section of your HTML
after both the tracking code snippet and all page content (e.g. at the bottom of the HTML body)


So I want konow if is true put the analitycs code in /public_html/templates/gk_twn2/layouts/default.php
and if is true put the analitycs code in /public_html/templates/gk_twn2/layouts/blocks/head.php

I want tray to change beacouse analitycs now work bad, so I want konw how I can try.
User avatar
Senior Boarder

GK User
Wed Apr 25, 2012 10:22 pm
There is no way that analytics work bad, analytics works or doesn't work - you got only 0 or 1 state. You can paste this code wherever you want to - effect will be the same.
User avatar
Platinum Boarder

GK User
Thu May 03, 2012 12:08 am
bkrztuk wrote:There is no way that analytics work bad, analytics works or doesn't work - you got only 0 or 1 state. You can paste this code wherever you want to - effect will be the same.


I'm sure that is so, I'm sure that don't count all the visitors, if I put the code in the public_html/templates/gk_twn2/layouts/blocks/head.php, in which part i have to put it?
User avatar
Senior Boarder

GK User
Sun May 06, 2012 10:34 am
Before </head> marker as it is said in google analytics documentation, please read my post below.
User avatar
Platinum Boarder


cron