Site statistics – visitors tracking, hit counters, etc.

Posted by michal-frackowiak on 01 Sep 2006 10:27, last edited by DrCaduceus on 01 Nov 2014 00:29

Tags: analytics counters hit site statistic visitors

rating: +9+x

This HOWTO describes ways to add statistics to your site – including hit counters, visitors tracking, etc.

Introduction

It is always nice to know how many people visit your site. No matter whether it is a large one or a small one, in general most of the people here would like to know if their sites are popular or not.

At the moment Wikidot.com does not offer any mechanism for tracking visitors, so it has been decided to allow 3rd party solutions to be embedded and used to measure traffic.

3rd party solutions

StatCounter

This solution works best here. What you have to do is:

  • Go to www.statcounter.com.
  • Create an account (if you do not have one).
  • Create a Project (for your Site).
  • Generate the tracking code.
  • Insert the tracking code into your pages using the embed tags.

Ok, and some details and tips:

  • When generating the tracking code, you can choose different options as all of them should work with Wikidot. All the choices are quite nicely described during the process.
  • You can decide if the counter is visible or not. You do not have to display a hit counter but this is a nice feature.
  • Or it is displayed as an image or as text. Text counters are easier to customize using text formatting.
  • On the page Code Options you should check no frames option. No other options are required to be changed.
  • Note: You can choose either the JavaScript version of the HTML-only version when generating your counter on StatCounter. Some claim that the JavaScript version slows down the loading pages making browsing less comfortable, and say you should only use the HTML version.
  • However, if you choose the JavaScript code, you will be allowed to track keywords searches, visitors' path, visitors locations, browsers used, and other Big Brother activities.

Now when you have a code you should embed it within your pages. It is a nice idea to embed it in your navigation elements so it is visible (and counting visitors too) on all of your pages.

So simply go to nav:side (default location of the side-bar) and paste the code there.

[[embed]]
-- insert your tracking code here --
[[/embed]]

If you're using the JavaScript version, remove the title attribute from the anchor inside the noscript portion. E.g., in the following from StatCounter:

<!-- Start of StatCounter Code -->
<script type="text/javascript">
var sc_project=1234567; 
var sc_invisible=1; 
var sc_partition=49; 
var sc_click_stat=1; 
var sc_security="00000000"; 
</script>
 
<script type="text/javascript" src="http://www.statcounter.com/counter/counter.js"></script><noscript><div class="statcounter"><a title="free web stats"href="http://www.statcounter.com/" target="_blank"><img class="statcounter" src="http://c.statcounter.com/1234567/0/00000000/1/" alt="free web stats" ></a></div></noscript>
<!-- End of StatCounter Code -->

…remove the title="free web stats" bit. Otherwise, you'll get the dreaded "no match for content" error from [[embed]].

Typical working example of an embedded statcounter code on my test site (test site) is:

[[embed]]
<a  href="http://www.statcounter.com/" target="_blank"><img src="http://c.statcounter.com/4302169/0/10abe4cb/0/" alt="hits counter" border="0" href="http://my.statcounter.com/project/standard2/stats.php?project_id=4302169&guest=1"></a>
[[/embed]]

To make the counter more embedded you can use (provided you are displaying a "text" counter):

This site has been visited [[embed]]
-- insert your tracking code here --
[[/embed]] times.

Or even fancier, to be displayed on the welcome page:

= **this site has been visited**
[[div style="text-align:center; font-size: 2em; font-weight: bold"]]
[[embed]]
-- insert your tracking code here --
[[/embed]] times
[[/div]]

This is almost exactly how the code tracking works in the Sandbox Site.

Apart from displaying the hit counter, StatCounter also offers other advanced statistics; this is not covered by this HOWTO though.

Google Analytics

Google Analytics is the easiest to implement because Wikidot has a way to automatically add Google Analytics code to all your pages.
Before anything, go to analytics.google.com and make an account or sign in with your Google account. It doesn't take that long to get started.
First, you need the tracking code, found at Google Analytics. Find your way to the tracking code page. It has two tabs, both containing code. Press Ctrl+U (⌘+U on a Mac). Press Ctrl+F (or ⌘+F) and type "UA-" (without the quotes). Ignore the first result and press the next button at the bottom of the window. Copy the UA-xxxx-x part (replace x with number) from the second result.
On Wikidot, settings for it can be found in Manage Site/3rd party tools/Google Analytics.
Enter your Tracking Information (like UA-xxxx-x), and enable the checkbox.

This does not work well for custom domains.

Clustrmaps

See at a glance where your site's visitors are located: instantaneously, even when the numbers are enormous! Visitors don't need to click on anything: just viewing your page is sufficient.
Get one Clustrmaps

bhgc.wikidot.com--thumb.jpg

The simple html code has to be converted into the wikidot [[image //source// link="..."]] format:

[[=image http://www3.clustrmaps.com/stats/maps-no_clusters/bhgc.wikidot.com--thumb.jpg  link="http://www3.clustrmaps.com/user/a463f343"]]
Add a New Comment

Related articles

Comments

Add a New Comment
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-Share Alike 2.5 License.