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.
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
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
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"]]
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.
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.
Sie können fragen und mitwirken in der deutschsprachigen » User-Gemeinschaft für WikidotNutzer oder
im deutschen » Wikidot Handbuch ?
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.
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.
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.
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.
@ 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:
If you want to then show that code in your page, you will need to iframe it in…
~ Leiger - Wikidot Community Admin - Volunteer
Wikidot: Official Documentation | Wikidot Discord server | NEW: Wikiroo, backup tool (in development)
Do you mean wikidot site manager? I haven't find necessary option there.
Neither do I. Have you already found it, dkorduban? GA seems like very complicated to me!
I solved the problem by manually creating a cookie and filtering against it (like ErichSteinboeck proposed). If you are asking about a new GA interface, filtering can be enabled from Admin > [your account] > Profiles > Filters.
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):
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
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.
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).
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.
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 :)
have a look at this thread, might help
http://community.wikidot.com/forum/t-1513/embed-problems#post-154421
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!
With external code file:
iframe http://your_address.wikidot.com/your_code_file/code frameborder="0" width="" height="" scrolling="no"
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
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.
I tried but couldn't make it work. But it looks cool on your site.
http://www.goingup.com
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
You could try it by using html in the format as shown below:
Followed by an iframe like this:
That method works for me.
Rob
Rob Elliott - Strathpeffer, Scotland - Wikidot first line support & community admin team.
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!!
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
Rob Elliott - Strathpeffer, Scotland - Wikidot first line support & community admin team.
You can try to write only these strings of your code:
<a href="http://www.statcounter.com/" target="_blank"><img src="http://c.statcounter.com/4433815/0/c7ec2e34/0/" alt="hits counter" border="0" href="http://my.statcounter.com/project/standard2/stats.php?project_id=4433815&guest=1"></a>
put it to your page and erase others. I hope, it should work. I had a problem like that some days ago, you can see, how I solved it - look up to my code: http://geography7.wikidot.com/nav:side (Options - Page source)
I tried to use the code snippet provided by StatCounter, and ran into some more problems besides the one with title attribute.
It seems that in order to make the standard StatCounter snippet work, you need to:
1) remove "title" attribute
2) remove "div" tag
3) change link address in "href" from original "http://statcounter.com/tumblr/" to "http://www.statcounter.com/"
IE my your original code was
and the working version was:
FlagCounter
The specific FlagCounter Code can be 'created' according to the settings required.
This is easily achieved in a step-by-step setup dialogue on the website of FlagCounter
Please check the Country List to see which Countries are supported.
For more detailed information please check out the FAQ page.
The above code is given by the FlagCounter website where the following Code is substituted, depending to the User Data:
's01' is the server's subdomain as given by FlagCounter at registration time
'UserAccount' is the User Account's Code as given by FlagCounter at registration time
There are various setup options available, like colour for text, background and frame, maximum Flags to be displayed, Number of Columns to use, and others.
For every visitor from a different country visiting your site a flag is added and then the number after the flags are the unique visitors from that country.
Good luck !
Kind regards
Peter
Peter-ZA
I just cannot get statcounter to work on my new site at all. It has been on my old site for years, still using the old "embed" and works perfectly. But a new install just will not function properly, as I get only the "iframed" pages or something. I have been through every "tuturial" I could find and experimented as much as I could but to no avail. I think this needs to be updated so that the default code is properly supported.
Before anyone says anything, YES, I have google analytics and the built-in web statistics. The built in stats are not real-time, and are not organized in as useful a way as statcounter. Real time statistics are useful when you do social stuff like facebook, etc. And I'm impatient.
Google analytics misses a lot of visits and is overly complicated and fancy. I still would like to have statcounter work, I'm a bit attached to it. If anyone has figured out how to make the default code work with a newly created wikidot site, please do let me know!