There's a Google Adsense plugin for dokuwiki available located at this website; http://www.systemengineers.de/plugins/google-adsense It requires inserting codes to each and might not be very practical, and this is especially for a wiki system where everyone can actually create and edit pages.
The other method is to go to the core of Dokuwiki itself, and edit the parser. In this case, we'll make Google Adsense ad to appear after the H1 heading, just as how it normally appear in blogs.
The trick is to edit a function called header in <dokuwiki installation directory>/inc/parser/xhtml.php. Originally there's a line in the function as the following;
$this->doc .= "</a></h$level>".DOKU_LF;
What the line do is to add the right <Hn> tag to each heading levels as defined in Dokuwiki's syntax. What we need to do is to tweak it to add our Google Adsense code if the defined level is '1', just as the following;
Comment anonymously. Login not required.