I made a wish for this, but it isn't very popular, apparently. Since it is listed as a supported embed, and it doesn't work (for new sites), I decided to submit it as a bug.
Statcounter has been working on my old site for years. But no matter what I do, I cannot get it to work on my new site. I suspect it has not been working for new sites since the old "embed" was done away with in favor of html blocks. I wish for wikidot to please get a working statcounter code for new wikidot sites. Perhaps there could be a special wikidot code like all these codes: http://statcounter.com/p7768914/reinstall/
I have just added to it to one of my new sites using the standard Statcounter code and the Wikidot html block and it seems to work OK and is already giving stats. When you say "it doesn't work" what do you mean? If it is that Statcounter says it can't find the code when you check the installation (which is what it said for me), in fact it does seem to be able to do so and provides stats.
Rob Elliott - Strathpeffer, Scotland - Wikidot first line support & community admin team.
It does not give actual stats for me, for the pages that are visited, but instead gives stats on the page the Iframe is contained on, the code page, or something like that. I used the default code for my first try, in a standard wikidot html block. This is an example of what statcounter is reporting:
culinarylore.wdfiles.com/local—html/nav%3Aside/b810a0e94cc244a3c800909d75076b6cc5f6c3e5-9822207252146492756/www.culinarylore.com/
This kind of thing happens no matter where I place the code.
Bartłomiej Bąkowski @ Wikidot Inc.
';.;' TeRq (Write PM)
Sure thing!
Okay, the code I am using on my older site, gustrength.com, is not the same as the codes they are generating now, but that code is working fine. They have many different codes to choose from based on different hosts, etc. and they have a "default code." The default code gives a choice of standard, standard (xhtml), basic, and basic (xhtml). I am assuming the xhtml options are not needed or would not work but I will give you all of these codes that it generates for me:
Standard
Standard (xhtml)
Basic
Basic (xhtml)
There are also many other codes for different hosts. Some of these give codes and some of them are just plugins. The code we used to use, I think, was the wordpress code. But they no longer give a wordpress code, they just give instructions to automatically get statcounter working on your wordpress site.
If you would like, to make this easier, I can put you in as a manager of my statcounter account temporarily, so that you can access the code page and all of that. And I can set you up as admin at my new site, culinarylore.com. Just PM me if you want me to do that. All I would need is an email to use.
At one point I duplicated my old code and changed the numbers in the code to match the numbers in my new code. That code worked on my new site for exactly ONE result and then stopped working. All the other codes either don't work at all or return results for me that correspond to the framed pages rather than the actual pages on my site.
Thank you so much for looking into this.
These codes should works fine now. Recompile pages to apply fix.
Bartłomiej Bąkowski @ Wikidot Inc.
';.;' TeRq (Write PM)
Thanks! I'll try it now.
It's not working. I am getting no tracking whatsoever. I have installed it in the side bar, which is where I installed the code in my old site. Should I install it someplace else?
By the way, I saw activity that you generated with the code, and this was not tracked to any actual landing page either, but to something like this:
terq.wdfiles.dev/local—html/statcounter/b0d1645c5c5699d6d8fd9205264a58b8fa30ac7a-12435907481571361627/terq.wikidot.dev/
By the way, I really don't know what you mean by "recompile pages to apply fix." Did you mean I should reinstall the code? Or did you mean something else? Please use plain language so I can understand you.
Update: It seems to have worked for one result. I'll wait and see if it starts working better…
terq.wikidot.dev is my local developer server.
About recompilation: when a page is saved with new content it is recompiled (wiki is parsed and a new compiled version is stored). All dependencies are also recompiled e.g. if you edit '_template', nav element, included pages.
To recompile a specific page you can simply edit and save it without any changes (it's a trick), but to force recompilation of all depending pages you need to edit and save it with new content (it can be even a wikidot comment or a whitespace inside a page).
About statcounter and other whitelisted codes: we allow only a small set of trusted HTML codes to be inserted directly into a page. This is due to security reasons. If a code matches any of our whitelist patterns, we insert it directly into the rendered HTML. If not, it is embeded in an iframe to prevent coss site scripting.
Example:
http://try.wikidot.com/html-codes
Bartłomiej Bąkowski @ Wikidot Inc.
';.;' TeRq (Write PM)
Thanks for the explanation, TeRq, I'll remember that. As of now, Statcounter seems to be working and delivering correct landing pages, etc. I understood about the whitelisted codes but thanks for that as well!
Thank you for getting this fixed. It really helps me a lot and means a lot because I am so used to using Statcounter to understand where my visitors are coming from, what I could do better, etc.
So, here we go again with the SAME problem on my new site. Statcounter keeps adding bits to the code.
The new site is http://www.liftbignow.com
I tried taking out the new parts of the code that were not on the last version of the code but that did not work. Here is the default STANDARD code:
Standard (xhtml)
Basic
Basic (xhtml)
Stat counter code seems to be changed, we need to improve our whitelist rule.
Bartłomiej Bąkowski @ Wikidot Inc.
';.;' TeRq (Write PM)
New stat counter i added to the whitelist.
Bartłomiej Bąkowski @ Wikidot Inc.
';.;' TeRq (Write PM)