Site statistics - visitors tracking, hit counters etc.

Posted by michal frackowiakmichal frackowiak on 1157106440|%e %b %Y|agohover, last edited by (user deleted) on 1246789209|%e %b %Y at %H:%M |agohover
Tags: analytics counters hit site statistic visitors

rating: +4+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 to:

  • 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, 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 geenerating 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 elemnts 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 some more advanced statistics. But this is not to be covered by this howto.

Google Analytics

Google Anaytics 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.

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"]]
visitor counters
dkh1978dkh1978 1203091318|%e %b %Y, %H:%M %Z|agohover

There are numerous types of visitor counters, but it's always best to use one written in code that your web site design software works well with. If you use standard HTML for your site, I recommend using a visitor counter like the ones at http://www.hodgesstudios.com. The code is all in HTML and it's very short & clean.

Reply  |  Options
Unfold visitor counters by dkh1978dkh1978, 1203091318|%e %b %Y, %H:%M %Z|agohover
Re: visitor counters
Helmuti_pdorfHelmuti_pdorf 1203235456|%e %b %Y, %H:%M %Z|agohover

Sorry, but this does not work with wikidot "embedding html" syntax. I have tested it..


Service is my success. My webtips:www.blender.org (Open source), Wikidot-Handbook.

Wollen Sie Wikidot helfen im deutschen » Wikidot Handbuch ?

Last edited on 1203235555|%e %b %Y, %H:%M %Z|agohover By Helmuti_pdorf + Show more
Reply  |  Options
Unfold Re: visitor counters by Helmuti_pdorfHelmuti_pdorf, 1203235456|%e %b %Y, %H:%M %Z|agohover
Re: visitor counters
VitesVites 1249506204|%e %b %Y, %H:%M %Z|agohover

Hi, google analytics is working fine on my wiki, http://businessideas.wikidot.com why not try it on yours. I tried and the statcounter never worked on my wiki, just like yours.
Peace.

Reply  |  Options
Unfold Re: visitor counters by VitesVites, 1249506204|%e %b %Y, %H:%M %Z|agohover
dkordubandkorduban 1207808090|%e %b %Y, %H:%M %Z|agohover

Dear admins! Your engine is really great, but GoogleAnalytics support needs a feature: possibility of setting custom cookies as described in GA docs to filter own traffic. It needs something like <body onLoad="…"> now.

Maybe, it's possible in other way - please tell.

Reply  |  Options
Unfold by dkordubandkorduban, 1207808090|%e %b %Y, %H:%M %Z|agohover
Re:
Phil ChettPhil Chett 1207819666|%e %b %Y, %H:%M %Z|agohover

you can do this from your google analytics account.
All you need do is set up GA function in site manager, then from the GA account apply the filter.

Reply  |  Options
Unfold Re: by Phil ChettPhil Chett, 1207819666|%e %b %Y, %H:%M %Z|agohover
please help setting internal traffic filtering
acaetanoacaetano 1262104930|%e %b %Y, %H:%M %Z|agohover

Since my IP address is dynamic, I would use the method of filtering by cookies, as described in http://www.google.com/support/googleanalytics/bin/answer.py?hl=en&answer=55481.

However, then I need to create a page in my wiki with the code <body onLoad="javascript:pageTracker._setVar('test_value');">.

I guess this is html code, right? My question is very basic, but I could not see a clear answer for it in the wikidot help: how do I create such a page, in such a way that it can really be used by Google Analytics in order to do the required filtering?

I have read something about the use of html code blocks in wikidot, but I could not understand whether this is just to have html code to be exhibited in the page or if the code is to be processed to produce an html page inside wikidot. Further, even if the latter case is true, is it enough for the use that Google Analytics intends to do in order to make the filtering by cookies?

I'm sorry if these questions are too basic, but I don't know much about such technicalities.

Unfold please help setting internal traffic filtering by acaetanoacaetano, 1262104930|%e %b %Y, %H:%M %Z|agohover
Re: please help setting internal traffic filtering
leigerleiger 1262133631|%e %b %Y, %H:%M %Z|agohover

@ acaetano

You can't create a full HTML page in Wikidot for security reasons.

HTML code blocks are primarily used for embedding content from other websites where the [[embed]] or [[embedvideo]] syntax does not work.

HTML code blocks look something like this:

[[code type="html"]]
HTML code goes here
[[/code]]

If you want to then show that code in your page, you will need to iframe it in…


— Shane | CycloDS Revolution | CycloDS Compatibility

Watch Avatar 3D. It is THE most spectacular film I've ever seen. It is really, genuinely EPIC.
No DVD or even the regular version of the same movie can match this in 3D on the big screen.

Reply  |  Options
Unfold Re: please help setting internal traffic filtering by leigerleiger, 1262133631|%e %b %Y, %H:%M %Z|agohover
Re: Google Analytics
ErichSteinboeckErichSteinboeck 1207832593|%e %b %Y, %H:%M %Z|agohover

setting custom cookies … to filter own traffic

I'm excluding my own traffic by:

1. Having [Greasemonkey] installed on every PC I'm using to access my Wikidot site

2. Adding the following User script to Greasemonkey (replace (mysitename) with the name of your site and UA-1234567-8 with your own Google Analytics code):

// ==UserScript==
// @name           (mysitename).wikidot.admins
// @namespace      http://geizhals.at/greasemonkeyscripts
// @description    Google Analytics Marker for (mysitename).wikidot.com
// @include        http://(mysitename).wikidot.com/
// @include        https://(mysitename).wikidot.com/
// ==/UserScript==
 
unsafeWindow._uacct="UA-1234567-8";
unsafeWindow.__utmSetVar("no_track");

3. Setting up the following filter on Google Analytics Edit Filter:
Filter Name: Exclude 'no_track'
Filter Type: Custom Filter
Exclude: (checked)
Filter Field: User Defined
Filter Pattern: no_track
Case Sensitive: Yes

Reply  |  Options
Unfold Re: Google Analytics by ErichSteinboeckErichSteinboeck, 1207832593|%e %b %Y, %H:%M %Z|agohover
Re: Google Analytics
David MarseillesDavid Marseilles 1212710882|%e %b %Y, %H:%M %Z|agohover

I'm coming kind of late to this game, but how can I be certain its working? I've got it running, enabled, but when I check my cookies (firefox), I'm unable to find one named as my filter pattern (test_value instead of no_track), and unable to find any under wiihd.wikidot.com with test_value anywhere in it.

Unfold Re: Google Analytics by David MarseillesDavid Marseilles, 1212710882|%e %b %Y, %H:%M %Z|agohover
Re: Google Analytics
ErichSteinboeckErichSteinboeck 1213532852|%e %b %Y, %H:%M %Z|agohover

I'm seeing the following (Firefox) cookie. Just type “no_track” (in your case “test_value”) into the Cookie Search box (Tools, Options, Privacy, Show Cookies).

Site: wikidot.com
Name: __utmv
Content: 97012121.no_track
Path: /

Be sure that you at least once have visited the exact page that you specified in the Greasemonkey script. In the below case this would be http://(mysitename).wikidot.com/ (not http://(mysitename).wikidot.com/start or something).

// @include        http://(mysitename).wikidot.com/

If you're not on the correct page, your Greasemonkey icon in the lower right corner will show “No scripts installed!” when right-clicked. If you are on the correct page, you'll see the script's name with a check-mark when right-clicking the Greasemonkey icon .

To test this in Google Analytics, set up a GA profile where you do not filter out your “test_value.” Then go to Visitors, User Defined, and you should see traffic with both a User Defined value of “(not set)” and “test_value”.

I've set up three GA profiles, called All Traffic, External Traffic, and Internal Traffic.

  • All Traffic doesn't filter by User Defined Value
  • External Traffic excludes all User Defined Value = “no_track” (“test_value” in your case)
  • Internal Traffic includes User Defined Value = “no_track” only
Reply  |  Options
Unfold Re: Google Analytics by ErichSteinboeckErichSteinboeck, 1213532852|%e %b %Y, %H:%M %Z|agohover
Anyone have a StatCounter Snippet?
crazyhappeningscrazyhappenings 1210012953|%e %b %Y, %H:%M %Z|agohover

I can not seem to get this work. I was hoping for a snippet that I could compare against in case my syntax is wrong…. but I can't seem to locate any. Can anyone help out? I'm trying to use the StatCounter. Thanks :)

Last edited on 1210012995|%e %b %Y, %H:%M %Z|agohover By crazyhappenings + Show more
Reply  |  Options
Unfold Anyone have a StatCounter Snippet? by crazyhappeningscrazyhappenings, 1210012953|%e %b %Y, %H:%M %Z|agohover
Re: Anyone have a StatCounter Snippet?
Phil ChettPhil Chett 1210020337|%e %b %Y, %H:%M %Z|agohover

have a look at this thread, might help
http://community.wikidot.com/forum/t-1513/embed-problems#post-154421

Reply  |  Options
Unfold Re: Anyone have a StatCounter Snippet? by Phil ChettPhil Chett, 1210020337|%e %b %Y, %H:%M %Z|agohover
My bug with StatCounter and the solution
ebrahimebrahim 1222084562|%e %b %Y, %H:%M %Z|agohover

I generated HTML code for StatCounter and embedding didn't work. I found out that I must remove title=XYZ attribute of <a> tag to make it work!

Reply  |  Options
Unfold My bug with StatCounter and the solution by ebrahimebrahim, 1222084562|%e %b %Y, %H:%M %Z|agohover
Re: My bug with StatCounter and the solution
DesacordoDesacordo 1223483078|%e %b %Y, %H:%M %Z|agohover

With external code file:

iframe http://your_address.wikidot.com/your_code_file/code frameborder="0" width="" height="" scrolling="no"

Reply  |  Options
Unfold Re: My bug with StatCounter and the solution by DesacordoDesacordo, 1223483078|%e %b %Y, %H:%M %Z|agohover
Custom Domain and Google Analytics
schokochrisschokochris 1231753208|%e %b %Y, %H:%M %Z|agohover

Hello!

I have just recently set up a custom domain for http://praemien-teilen.wikidot.com which is http://praemien-teilen24.de. Now both domains can be found with google. My google analytics account was set up for the praemien-teilen.wikidot.com site. Because google analytics and the web statistics at the admin:manage page differ I figure that google analytics does not count the visitors which enter over praemien-teilen24.de. Is there a workaround? I would like the complete stats that analytics offers …

Thanks
Christian

Last edited on 1231753336|%e %b %Y, %H:%M %Z|agohover By schokochris + Show more
Reply  |  Options
Unfold Custom Domain and Google Analytics by schokochrisschokochris, 1231753208|%e %b %Y, %H:%M %Z|agohover
Re: Custom Domain and Google Analytics
scottplanscottplan 1231810445|%e %b %Y, %H:%M %Z|agohover

Hi Christian:

I've had Google analytics trained on my wikidot subdomain for about 18 months. It lumps together visits via the custom domain and the wikidot subdomain — no difference.

S.

Reply  |  Options
Unfold Re: Custom Domain and Google Analytics by scottplanscottplan, 1231810445|%e %b %Y, %H:%M %Z|agohover
What about This stat counter?
dessdess 1234476880|%e %b %Y, %H:%M %Z|agohover

I tried but couldn't make it work. But it looks cool on your site.
http://www.goingup.com

Reply  |  Options
Unfold What about This stat counter? by dessdess, 1234476880|%e %b %Y, %H:%M %Z|agohover
Sorry, no match for the embedded content! X-(
amsmitamsmit 1239961569|%e %b %Y, %H:%M %Z|agohover

Dear admins,

I'm trying to put a counter on my website but despite of your descriptions i can't get it to work and i don't know what i'm doing wrong. I copied the StatCountercode in the nav:side part of my webside (with and without the title atribute) but there's 'no match for the embedded content'. :-(
It's probably a stupid little mistake but can anyone help me out?
Thank you so much!

Greetings,
Anne-Marie

P.s. my wiki website is http://schakelzaken.wikidot.com/nav:side

Reply  |  Options
Unfold Sorry, no match for the embedded content! X-( by amsmitamsmit, 1239961569|%e %b %Y, %H:%M %Z|agohover
Re: Sorry, no match for the embedded content! X-(
RobElliottRobElliott 1239962292|%e %b %Y, %H:%M %Z|agohover

You could try it by using html in the format as shown below:

[[code]]
<html>
 <head>
    <title>StatCounter</title>
  </head>

<body>
  <!-- Start of StatCounter Code -->
<script type="text/javascript">
var sc_project=4433815; 
var sc_invisible=0; 
var sc_partition=55; 
var sc_click_stat=1; 
var sc_security="c7ec2e34"; 
</script>

<script type="text/javascript"
src="http://www.statcounter.com/counter/counter.js"></script><noscript><div
class="statcounter"><a title="blogger counters"
href="http://www.statcounter.com/blogger/" target="_blank"><img
class="statcounter" src="http://c.statcounter.com/4433815/0/c7ec2e34/0/"
alt="blogger counters" ></a></div></noscript>
<!-- End of StatCounter Code -->
</body>
</html>
[[/code]]

Followed by an iframe like this:

[[iframe http://yoursite.wikidot.com/yourpage/code/1 frameborder="0" scrolling="no" width="100%" height="50px"]]

That method works for me.

Rob


ad5.png
Last edited on 1239969752|%e %b %Y, %H:%M %Z|agohover By RobElliott + Show more
Reply  |  Options
Unfold Re: Sorry, no match for the embedded content! X-( by RobElliottRobElliott, 1239962292|%e %b %Y, %H:%M %Z|agohover
Re: Sorry, no match for the embedded content! X-(
(account deleted) 1239971013|%e %b %Y, %H:%M %Z|agohover

Hi Rob… I also use that method and sure that work… but when I see the result… It seems only record the URL that visited is only came from

http://yoursite.wikidot.com/yourpage/code/1

and not the other else… so I prefer to shut off the JavaScript from StatCounter option and viola…. the real visited URL can be recognised again by the StatCounter system…

I'm taking all my words, this howto is working well, but with some more revision… Cheers!!

Last edited on 1246789277|%e %b %Y, %H:%M %Z|agohover By (account deleted) + Show more
Unfold Re: Sorry, no match for the embedded content! X-( by (account deleted), 1239971013|%e %b %Y, %H:%M %Z|agohover
Re: Sorry, no match for the embedded content! X-(
RobElliottRobElliott 1239976312|%e %b %Y, %H:%M %Z|agohover

I have the code and stat counter running in my sandbox after I was experimenting with the html/iframe solution for someone (and it's their stats!). But I must admit I don't actually use it myself and have not tried it in the sidebar. One of the advantages of the Pro account is that you get very comprehensive webstats which removes the need for something like statcounter.

Rob


ad5.png
Reply  |  Options
Unfold Re: Sorry, no match for the embedded content! X-( by RobElliottRobElliott, 1239976312|%e %b %Y, %H:%M %Z|agohover
Add a New Comment
page_revision: 16, last_edited: 1246789209|%e %b %Y, %H:%M %Z (%O ago)
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-Share Alike 2.5 License.