cPanel: How to create a hit counter

A hit counter, or web counter, is a software program that counts the number of visitors (“hits”) a particular web page receives. Once set up, the program will count each time a web page is accessed.

Counters only tally visits to the pages they are located on. Note that they can be inaccurate, as each time you or your visitors view or refresh/reload a page, the count increases.

You can create a hit counter from your cPanel, using the following instructions:

  1. Log in to your HostPapa dashboard: https://www.hostpapa.com/dashboard

  1. Click on My cPanel. If you have more than one domain associated with your HostPapa account, click on the appropriate domain link, then enter your cPanel password if required.

  2. From the Software/Services section, click on the CGI Center icon.

  3. Click on Counter.

  4. Complete the form to create a counter that meets your needs, then click the Preview button.
    Note: You can preview repeatedly as you create the counter.

  5. When finished, click the html button; this will generate the code required for the counter.

  6. Save the code in a safe place, as you will need to add it to your web page.

A Better Alternative

A better way to keep tabs on your website traffic and the specific pages being visited, is to use the statistics and tracking tools included with your HostPapa account. These include Webalizer, AWStats, and the Raw Access Logs.  These tools are available in your cPanel and will need to be enabled to start collecting stats.

To do so, please follow these steps:

  1. From the Logs section of your cPanel, click on Choose Logs Programs.

  2. Check the box for each stats program you wish to enable on your domain name.
    Please note: For addon domains, you will need to enable the stats programs for the subdomain as well as the addon domain name (e.g., for addondomain.primarydomain.com, not just addondomain.com).

  3. Click Save.

The log programs will be activated right away, but it may take up to 24 hours before the first report is generated.

 

This article is also available in: French, Spanish, German

  • Was this article helpful ?

  • yes   no

Related Articles