[Mailman-Users] How to insert google-analytics.com in mailmanarchives

Mark Sapiro mark at msapiro.net
Tue Apr 21 05:06:57 CEST 2009

audit wrote:

>I'm trying to inset google-analytics.com in mailman archives and when I 
>use the normal new coding to insert in the templates, it gives me strange 
>script errors when I view the pages after running bin/arch listname

You should be able to insert the javascript into the templates
archtoc.html, archtocnombox.html, archidxhead.html and article.html
and have it work?

What errors do you get?

What do you see if you view the raw source of the page or if you view
the .html files in the archive?

>If I run the old code then it works fine but I was just reading that the 
>old code may not show the correct stats.

Do you know the new code works? Maybe it's not compatible with your

>Is there a way to insert the code into a html file and then call it from 
>the templates?

You could reference the script via a <script type="text/javascript"
src="whatever"> tag which you put in the template.

>I have my phpads showing just fine with the script code so I don't 
>understand why the google code won't work when I add that.

Templates have values interpolated into them. I.e. strings like
%(name)s, etc. get replaced by the value of 'name'. This means in
particular that if you want to put a literal '%' character in a
template, you have to double it ('%%'). Is this the problem?

Mark Sapiro <mark at msapiro.net>        The highway is for gamblers,
San Francisco Bay Area, California    better use your sense - B. Dylan

More information about the Mailman-Users mailing list