Do I have to generate code on the site for each page or can I have my CGI (ASP, PHP, Perl, ColdFusion) pages generate the code?

If your site is cgi or dynamically generated, you can automatically generate WunderCounter code via your scripts. Have a look at the Tutorial on this subject for an in-depth discussion of how to tackle this. Tutorials are found under the "help" menu on your main stats page.