Posted by michal-frackowiak on 01 Sep 2006 10:27, last edited by DrCaduceus on 01 Nov 2014 00:29
This HOWTO describes ways to add statistics to your site – including hit counters, visitors tracking, etc.
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
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.
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]]
…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 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.
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
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"]]