Andrew Watson | 3 Jul 2012 05:54
Picon
Favicon

google tracking code

How can I put google tracking code in archived email messages?
I am using pipermail.
------------------------------------------------------
Mailman-Users mailing list Mailman-Users <at> python.org
http://mail.python.org/mailman/listinfo/mailman-users
Mailman FAQ: http://wiki.list.org/x/AgA3
Security Policy: http://wiki.list.org/x/QIA9
Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/
Unsubscribe: http://mail.python.org/mailman/options/mailman-users/gmmu-mailman-users%40m.gmane.org

Mark Sapiro | 3 Jul 2012 21:29
Favicon

Re: google tracking code

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 <at> msapiro.net>        The highway is for gamblers,
San Francisco Bay Area, California    better use your sense - B. Dylan

------------------------------------------------------
(Continue reading)

Stephen J. Turnbull | 4 Jul 2012 09:57
Picon
Favicon

Re: google tracking code

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"?

Steve
------------------------------------------------------
Mailman-Users mailing list Mailman-Users <at> python.org
http://mail.python.org/mailman/listinfo/mailman-users
Mailman FAQ: http://wiki.list.org/x/AgA3
Security Policy: http://wiki.list.org/x/QIA9
Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/
Unsubscribe: http://mail.python.org/mailman/options/mailman-users/gmmu-mailman-users%40m.gmane.org

Mark Sapiro | 4 Jul 2012 18:42
Favicon

Re: google tracking code

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 <at> msapiro.net>        The highway is for gamblers,
San Francisco Bay Area, California    better use your sense - B. Dylan

------------------------------------------------------
Mailman-Users mailing list Mailman-Users <at> python.org
http://mail.python.org/mailman/listinfo/mailman-users
Mailman FAQ: http://wiki.list.org/x/AgA3
Security Policy: http://wiki.list.org/x/QIA9
Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/
Unsubscribe: http://mail.python.org/mailman/options/mailman-users/gmmu-mailman-users%40m.gmane.org

Stephen J. Turnbull | 5 Jul 2012 01:58
Picon
Favicon

Re: google tracking code

Mark Sapiro writes:
 > No.

Sorry!  Gotta stop writing non-urgent mail on planes (especially when
flying out of a disaster area....)

 > What I wrote is a bash extglob

*sigh* Yet another reason to hate bash....  (YMMV of course, not a
criticism of you for using it!)

------------------------------------------------------
Mailman-Users mailing list Mailman-Users <at> python.org
http://mail.python.org/mailman/listinfo/mailman-users
Mailman FAQ: http://wiki.list.org/x/AgA3
Security Policy: http://wiki.list.org/x/QIA9
Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/
Unsubscribe: http://mail.python.org/mailman/options/mailman-users/gmmu-mailman-users%40m.gmane.org


Gmane