How to Move the StatCounter Code to a Subdomain
Most Web developers know about StatCounter, a free "invisible" stat tracker that records among other things the number of visitors you get to your website. But you don't need to be a developer to use and manipulate the tracker tool. You can put the code on whatever page you like --- on any of your domains --- as long as you have access to the server and the HTML files.
Instructions
-
-
1
Log in to the StatCounter website and then click "My projects." (See References.) You'll see your current StatCounter setup --- presumably for your root domain --- in the main window. Click "Add project." Even the free version of the tracker lets you add a few different projects.
-
2
Type the name of your website in the "Project Title" box and then type the address of you sub-domain. If your regular site is puppies.com, for example, enter newsite.puppies.com in this area. Choose your time zone and country. StatCounter only uses this information to generate the code --- the information you put in here isn't directly connected to how your counter works.
-
-
3
Choose your configuration options on the right side of the screen. You can pick either a visible counter, a StatCounter button or Invisible Tracking. The first two options show a link to StatCounter on your page, but Invisible Tracking is just that --- invisible. Choose an email type, then click "Add Project."
-
4
Choose a website type from the list to simplify adding the code to your subdomain. If you know what kind of content management system you use, choose it from the list and follow the prompts to insert the code. Otherwise, choose "Default Installation Guide." StatCounter creates four versions of the code: standard, basic and XHTML versions of both. Choose the type of code that suits your design and click "Copy to clipboard."
-
5
Open your Web editor and then open the root page for your subdomain --- almost always "index.html." Paste the code from StatCounter into your index page (or onto any sub-page that you want to track) just before the "</body>" tag. The invisible code is written in a way so as to not interfere with your layout or design. If you choose a visible code, pay attention to where you paste it so that it doesn't shift objects around on your page.
-
6
Save the "index.html" page and upload it to your server. To track your stats, log back in to StatCounter and click on your new project.
-
1