Perl-Apache2-Filter-GoogleAnalytics is a project mainly written in Perl, it's free.
Add GA code to served HTML document
404: Not Found