
How can I put google tracking code in archived email messages? I am using pipermail.

Andrew Watson wrote:
How can I put google tracking code in archived email messages? I am using pipermail.
Existing archived messages or new messages as they are archived?
For new messages it's trivial. Just make a sitewide version of the article.html template for each supported language that includes the tracking code. See the FAQ at <http://wiki.list.org/x/jYA9>.
For existing archived messages there are a couple of ways. The easiest is just run "bin/arch --wipe LISTNAME" on each list after installing the edited article.html template, but this can be time consuming and have undesirable side effects if your LISTNAME.mbox files go back a long way.
The other way is to just write a script to add the tracking code to every archives/private/*/*/+([0-9]).html file.
In either case, you may then want to fix the change date of the files. See <http://www.msapiro.net/scripts/update_archive_mtime> for the rationale and a script to do this. In fact, you could modify that script to add the tracking code too.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan

Stephen J. Turnbullwrote:
Mark Sapiro writes:
The other way is to just write a script to add the tracking code to every archives/private/*/*/+([0-9]).html file.
Shouldn't that be "archives/private/*/*/[0-9]+\.html"?
No. What I wrote is a bash extglob, not a regular expression (note '*', not '.*'). If it were an re it might be something like "archives/private/[^/]*/[^/]*/[0-9]+\.html".
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
participants (3)
-
Andrew Watson
-
Mark Sapiro
-
Stephen J. Turnbull