If you’ve ever wondered – or flat-out need to know – which topics are the most popular ones in your Help, there is a way to gather these stats using NetHelp 2.0 and Google Analytics.
- To start out, set up a Google Analytics account. Start by signing in, then work through the steps.
- Once you have an account, open Doc-To-Help and create a custom NetHelp 2.0 Theme. See Adding a NetHelp 2.0 Theme for instructions. Your custom Theme will be stored in the \\My Doc-To-Help Projects\Doc-To-Help\Themes\NetHelp 2.0\Themes\Name of Theme folder.
- Download the zip file included with this post and drop it into the Theme’s folder. Unzip it.
- Open the layout.html file (located in the same Theme folder) and add <script src=“jquery.nethelp.ga.js”></script> at the end of the head section.
- Add your Google Analytics script after the jquery script. (See the example below.)
- Rebuild the NetHelp 2.0 Target.
Here is what the beginning of the layout.html file will now look like (new items are pink):
<?xml version="1.0" encoding="utf-8" ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <link rel="stylesheet" type="text/css" media="all" href="theme.css" /> <link rel="stylesheet" type="text/css" media="screen" href="screen.css" /> <link rel="stylesheet" type="text/css" media="screen" href="splitter.css" /> <link rel="stylesheet" type="text/css" media="print" href="print.css" /> <link rel="stylesheet" type="text/css" media="all" href="topic.css" /> <link rel="stylesheet" type="text/css" media="all" href="custom-icons.css" /> <link rel="stylesheet" type="text/css" media="all" href="user.css" /> <script type="text/javascript" src="theme.js"></script> <script type="text/javascript" src="splitter.js"></script> <script type="text/javascript" src="search-addons.js"></script> <script src="jquery.nethelp.ga.js"></script> <script type="text/javascript"> var _gaq = _gaq || []; _gaq.push(['_setAccount', 'UA-5551212-1']); _gaq.push(['_trackPageview']); (function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })(); </script></head> <body>
For more on customizing a NetHelp 2.0 Theme, see Using the Theme Editor.
Download the script here: jquery.nethelp.ga
Now you can analyze away
Bonus Google goodness: if you would like to add Google Search to your NetHelp, see Integrating Google Custom Search into Your NetHelp Outputs.




We just tried this and it works great. Thanks.
Thanks very much for this information, it is very helpful.