General XMetaL Discussion

XMetaL Community Forum General XMetaL Discussion Webhelp page visitor counter

  • rnv

    Webhelp page visitor counter

    Participants 2
    Replies 3
    Last Activity 9 years, 3 months ago


    This might be a bit out of direct XMetaL discussion but hope someone can point me to the right direction.

    I need some sort of counter to identify number of visitor to the webhelp. The counter is not to be meant to be displayed to the user but for internal auditing. i found some services offering such tracking but such services are not an option for me.

    Would like to know if Webhelp itself offers that or how do i modify the java script so that I can build my own counter?

    will really appreciate,


    Derek Read

    Reply to: Webhelp page visitor counter

    Webhelp does not include such a feature. You would need to use some type of server-side code or external service to keep track of this as Webhelp runs in the browser (there are no server side scripts included with Webhelp, and it does not need to be hosted by a web server at all).

    I think you are probably looking at several options:

    1. Find out if your web hosting company offers something like this and find out what they need you to include in your webpages to track it.* If you can pinpoint the exact code that needs to appear in each HTML page then making modifications to the DITA Open Toolkit to include that is quite easy provided what is included in the web page is HTML (not PHP or some server side language)*. You can include “footer” information in any HTML output using the DITA OT and the feature discussed here:,1998.msg5706.html#msg5706

    Note that you can also easily include content in each HTML page at the start inside the section and just inside the using the same dialog (in case whatever you end up using requires additions there as well).

    2. If your web hosting company does not offer something like this and you wish to run these trackers on your own website find out what servers-side language(s) your website supports, locate an appropriate server-side script that will do the tracking and incorporate that into your site.*

    3. Use a 3rd party service, such as “Google Analytics” or “StatCounter”. Find out what code you need to include in each HTML page and then make modifications as in #1. This would be my first recommendation as most are extremely easy to set up and many are free (the two I have noted here are free) and some (including those two) gather lots of useful information about your audience beyond simply counting the page views. Search for “free page counter” and you will see lots of similar services offered. Most of these services offer a “static page” version of their code. In some cases it is as simple as adding a link to an image to your pages. Google's version requires you to add a script to your pages (you can see that we use it on the forum by checking the page source for this page).

    * Keep in mind that the DITA OT cannot be made to generate something like PHP (at least not without a substatial rewrite) so you will want to find a solution you can incorporate into “static” HTML pages. The simpler the better (hence Google Analitics or some similar free service).

    I'm not sure what your objection to using a service is. If it is cost then choose a free one. If you do not want your data to be used by someone else then you need to go with something like #1 or #2.



    Reply to: Webhelp page visitor counter


    first of all thank you very much for your response.

    I cannot use 3rd party solution and do not have any such services in our web service. So I need to use option 2.

    Can you point me to any link with examples where I can see how it is done. Will be nice if i can do that using java script.



    Derek Read

    Reply to: Webhelp page visitor counter

    I can't really recommend anything specific. Please check with your website developers to see what they recommend as the solution will depend very much on what is running your website and how it is designed. The solution you opt for will need to function together with that.

    This issue really has little to do with Webhelp. What you really need is to consult with a website designer. I see that you work for a very large company so surely you can find someone to help you set this up for your website (or your portion of the website).


  • You must be logged in to reply to this topic.

Lost Your Password?