Home Forums General XMetaL Discussion Webhelp page visitor counter Reply To: Webhelp page visitor counter

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:

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.