Advertisement:

how to track visitors?

Aloittaja AntiRules, helmikuu 21, 2008, 10:47:40 AP

« edellinen - seuraava »

karlbenson

If you want extended logging like that, you might want to look into Google Analytics.

AntiRules


karlbenson


AntiRules

thanks karlbenson its really gr8 but where i put the code i need to track the topics so where i put the code ?

Harro

You have to put that code just before the </body> tag in your index.template.php file of the theme you are using.
Also make sure that you add a \ before every '  in the code you get from google.

AntiRules

i didnt understand why i should add \ before the '

Harro

If you keep the single quotes you will get parse errors since the single quote is used in the php script to show things.
Something like this will give a parse error
echo ' it's the google code ';
The ' in " it's " will break the echo statement and give the parse error.
To prevent that you have to add the \ before it.
Like this:
echo ' it\'s the google code';
Then you won't get that error. It's just basic php syntax.
Look it up if you don't believe me :P

Google uses the ' quotes in their quote, and SMF uses the echo statement to show things on the screen. So if you don't change the ' to \' you'll get errors.

Advertisement: