Track Your Wiki Article Page Views

Track Your Wiki Article Page Views

Currently (as of initial publishing of this article) there is no built-in feature to keep page statistics of the Wiki article you author (yet).
As discussed on the Wiki Technet Forum, this topic is on the requested feature list.

This article shows you a quick and easy way to keep some basic article statistics.
It's valid for other web pages too (like your blog, your own website, ...)

There are some providers out there (like Statcounter, Omniture, Google, Webtrends...) that deliver easy web analytics of your web page.
Some of them like are free (like StatCounter, ...).
In this article, the samples and screenshots are based on Statcounter, but the procedure will be similar for other providers.

In most cases they require to install a piece of tracking code (HTML tag).


This step-by-step uses Statcounter as provider, but this probably applies to other providers too.

1. Register for a website analytics provider

Most of the providers will guide you through the initial setup and provide a wizard to generate the tracking code

2. Generate HTML tracking code

Default, most providers will generate scripted code.


The Wiki engine strips script when publishing or saving your article, so keep it simple. Stick to HTML.
The provider likely will use a wizard to generate the HTM code for you.

Trim the code, remove unnecessary info.
In fact, just keep the reference to the image source locaton (<img src=> tag).

TIP: in your tracking tag, remove the active hyperlink in HTML as it will show up in your Wiki article with an hyperlink icon.

Copy the trimmed HTML tag (from <a to </a>).

3. Open you Wiki article in edit mode

4. Go into HTML edit

In the left below corner, click the HTML button.

Move to the end of the article. 

5. Add the HTML code at the end of the article

Save the article
Your tracking tag should be invisible.

6. Tracking your article statistics

Once the page is published, you can start collecting data.

As example:



Or: see yourself (this is the public part of the stats page of this Wiki article)

Do keep in mind

  • Limit the use of the tracking scipts, as the page load impacted.
  • The engine through which the Wiki articles are published, strips active scripts for security reasons, so better stick to HTML only scripts.
  • On TNWiki, you will not be able to collect advanced statistics because you cannot use the advanced features of the full scripts. (*)
  • The Wiki platform is a multi user platform, so it's possible that the logging HTML code can be changed/removed. Keep a close eye on your statistics. If they don't yield data, check the plugin in your article.
  • Carefully check the code of conduct and the terms-of-use of the platform on which you enable the tracking

And don't ...

  • overload your wiki page with hitcounters, even better: don't use the visible counter (*)
  • remove someone else's tracking code

(*) But feel free to use scripts or visible counters on your own blog, your own webspace, ....

Wiki feature request

If you would like to make this page obsolete, by including the essential page and author metrics natively to the Wiki interface: let us know and join the disussion on the Wiki Technet Forum.
See the section below for the applicable threads (but there are more...).

See also

- Wiki Technet Forum thread - page visits: possible?
- Wiki Technet Forum thread- Proposed Metrics
Leave a Comment
  • Please add 6 and 5 and type the answer here:
  • Post
Wiki - Revision Comment List(Revision Comment)
Wikis - Comment List
Sort by: Published Date | Most Recent | Most Useful
Posting comments is temporarily disabled until 10:00am PST on Saturday, December 14th. Thank you for your patience.
  • Very interesting.

    Great job, Peter.

  • I think this could be one of the "Featured Articles".

  • I like the "Wiki feature request" section. Great job!

  • Yes, it's very nice, thanks!

  • Nice article, thanks.

Page 1 of 1 (5 items)