StatCounter User Forum  
StatCounter Free web tracker and counter

Go Back   StatCounter User Forum > StatCounter.com > Help

Closed Thread
 
Thread Tools Display Modes
  #1  
Old 09-06-2007, 05:34 AM
Inelia Inelia is offline
Junior Member
 
Join Date: Sep 2007
Posts: 2
Default Adding Statcounter to Joomla

There are two ways you can do this, one is to add the code directly to the template you are using and the other is to add it to a module and publish the module somewhere on your site.
The first way is done in the following way:
1. Open your site using FTP or via your host.
2. Go to the "templates" directory.
3. Open the directory with the name of the template you are using.
4. Open "index.php" and add the code somewhere in between the <body></body> tags.

The second way, and the way I recommend as it is template independent is:
1. Go to the backend of the site using yoursite/administrator
2. Click "User Manager"
3. Click on your user account
4. Under "Parameters" "User Editor" choose "No WYSIWYG Editor"
5. Accept the changes by pressing the "Save" button and then go to "Modules" and "Site Modules"
6. Press "new"
7. Give it a title, choose whether to show the title or not. If it's invisible then don't show the title.
8. Add the code and decide where to place it on your page.
9. Publish your new module.
10. Press the "Save" button and go and check your site frontend to see if you are happy with it.
19. When you are happy with it, go back to the "User Manager" and change your editor to something friendly. But remember that if you want to make changes to the code in the future you must choose "No WYSIWYG Editor" before opening the module it and saving the changes or else the code will vanish.

Enjoy!
Inelia

Last edited by Inelia; 09-06-2007 at 06:06 AM. Reason: I had placed my url at the end and then read we can't do that.
  #2  
Old 09-06-2007, 02:13 PM
webado's Avatar
webado webado is offline
Moderator
 
Join Date: Apr 2004
Location: Montreal, Quebec, Canada
Posts: 28,527
Default

Thanks for these explanations.

I will make this a sticky
__________________
Christina
>>Forum Moderator<<

Please do not PM me for support. The forum is here for that.
  #3  
Old 11-15-2007, 12:32 AM
007Lipuchka 007Lipuchka is offline
Junior Member
 
Join Date: Nov 2007
Posts: 4
Default

first way too easy it's for me, thx
  #4  
Old 01-02-2008, 03:09 AM
Cynthia Joffrion Cynthia Joffrion is offline
Junior Member
 
Join Date: Jan 2008
Posts: 1
Default

Quote:
Originally Posted by Inelia View Post
There are two ways you can do this, one is to add the code directly to the template you are using and the other is to add it to a module and publish the module somewhere on your site.
The first way is done in the following way:
1. Open your site using FTP or via your host.
2. Go to the "templates" directory.
3. Open the directory with the name of the template you are using.
4. Open "index.php" and add the code somewhere in between the <body></body> tags.

The second way, and the way I recommend as it is template independent is:
1. Go to the backend of the site using yoursite/administrator
2. Click "User Manager"
3. Click on your user account
4. Under "Parameters" "User Editor" choose "No WYSIWYG Editor"
5. Accept the changes by pressing the "Save" button and then go to "Modules" and "Site Modules"
6. Press "new"
7. Give it a title, choose whether to show the title or not. If it's invisible then don't show the title.
8. Add the code and decide where to place it on your page.
9. Publish your new module.
10. Press the "Save" button and go and check your site frontend to see if you are happy with it.
19. When you are happy with it, go back to the "User Manager" and change your editor to something friendly. But remember that if you want to make changes to the code in the future you must choose "No WYSIWYG Editor" before opening the module it and saving the changes or else the code will vanish.

Enjoy!
Inelia
Thanks you so much for the information. This helped me out a lot.
  #5  
Old 03-31-2008, 01:41 PM
osousa osousa is offline
Junior Member
 
Join Date: Mar 2008
Posts: 1
Post Thanks

Quote:
Originally Posted by Inelia View Post
There are two ways you can do this, one is to add the code directly to the template you are using and the other is to add it to a module and publish the module somewhere on your site.
The first way is done in the following way:
1. Open your site using FTP or via your host.
2. Go to the "templates" directory.
3. Open the directory with the name of the template you are using.
4. Open "index.php" and add the code somewhere in between the <body></body> tags.

The second way, and the way I recommend as it is template independent is:
1. Go to the backend of the site using yoursite/administrator
2. Click "User Manager"
3. Click on your user account
4. Under "Parameters" "User Editor" choose "No WYSIWYG Editor"
5. Accept the changes by pressing the "Save" button and then go to "Modules" and "Site Modules"
6. Press "new"
7. Give it a title, choose whether to show the title or not. If it's invisible then don't show the title.
8. Add the code and decide where to place it on your page.
9. Publish your new module.
10. Press the "Save" button and go and check your site frontend to see if you are happy with it.
19. When you are happy with it, go back to the "User Manager" and change your editor to something friendly. But remember that if you want to make changes to the code in the future you must choose "No WYSIWYG Editor" before opening the module it and saving the changes or else the code will vanish.

Enjoy!
Inelia
Thanks that's really useful

How do I add the code to specific joomla pages?

  #6  
Old 03-31-2008, 01:52 PM
webado's Avatar
webado webado is offline
Moderator
 
Join Date: Apr 2004
Location: Montreal, Quebec, Canada
Posts: 28,527
Default

That you have to do within the content you add to those pages.
__________________
Christina
>>Forum Moderator<<

Please do not PM me for support. The forum is here for that.
  #7  
Old 05-14-2008, 09:53 AM
alphons alphons is offline
Junior Member
 
Join Date: Jul 2005
Location: Ronda
Posts: 4
Default

Dear Inelia,

For Joomla, does the statcounter code need to be XHTML compliant if I enter it into a module?

Thankyou!

Alphons
  #8  
Old 05-14-2008, 11:35 AM
webado's Avatar
webado webado is offline
Moderator
 
Join Date: Apr 2004
Location: Montreal, Quebec, Canada
Posts: 28,527
Default

If the template used for the site uses an xhtml doctype (most likely), then the Statcounter code used has to be the XHTML compliant version.

View the source code of any page and you will know.
__________________
Christina
>>Forum Moderator<<

Please do not PM me for support. The forum is here for that.
  #9  
Old 06-11-2008, 08:03 PM
maxeaus maxeaus is offline
Junior Member
 
Join Date: Jun 2008
Posts: 1
Default Adding code to Joomla

As Webado will know from Google forums, i am rather slow on the uptake on this technical stuff! Do you have to add the code to the module AND each and every page you want counted?

OR do you just add the code to the pages if you have more than 1. Also what do you mean by "add the code and decide where you want it on your page",are you talking about the module/page here?, or refering to the page/s eg you add it to the module, then where you want it on your pages.

Im guessing that its best to put it at the bottom of all content on your page. Also when choosing the code do i choose the default option?I am currently using fck html editor.

Last edited by maxeaus; 06-11-2008 at 08:06 PM.
  #10  
Old 06-11-2008, 11:51 PM
webado's Avatar
webado webado is offline
Moderator
 
Join Date: Apr 2004
Location: Montreal, Quebec, Canada
Posts: 28,527
Default

No, you don't add the code to anything you create using Joomla - that only handles specific content.

Let's say you installed Joomla in the folder called joomla on your website.
Let's say the particualr template you are using is rhuk_solarflare_ii

Using an FTP program go to the folder: joomla/templates/rhuk_solarflare_ii/

Download index.php .

Open it in Notepad and go to the bottom where you will find:

</body>
</html>

Inser the Statcounter code just above </body> . Save and re-uplaod back to the same palce.

Then the code will appear on all your Joomla pages that use that same template.

But you can also add the code to the footer module instead of to the template itself.

Using FTP access the folder /joomla/includes/ . Download the file footer.php .

Open it in Notepad and you will see it's a mix of html and php code.

Add the Statcounter code in there. If it's invisible anyway, just add to the bottom, since positioning in the layout is irrelevant. Otherwise add it in one or the other <div> ..</div> or in a new one by itself, with whatever styling you also need. You will need to know enough html and css to fiddle with that adequately.

The effect will be that the counter will appear on all pages regardless of template used.
__________________
Christina
>>Forum Moderator<<

Please do not PM me for support. The forum is here for that.
Closed Thread

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 05:10 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.