Skip to content

Milter (mail filter) to add Matomo Analytics tracking parameters to Mailman e-mails. Can be edited quite easily for use with Google Analytics, etc.

License

Notifications You must be signed in to change notification settings

yurimataev/analytics-milter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Analytics Milter

This milter adds (Matomo)[https://matomo.org/] tracking parameters to e-mails sent to specific e-mail addresses. This makes sense if you are running a Mailman mailing list as an announce-only mailing list.

It wouldn't be hard to modify for Google Analytics tracking. In fact, since Matomo can be configured to use Google parameters (utm_content, utm_campaign, etc) that should probably be the default.

Tested with a Postfix mail server.

Installation Instructions

These instructions are for a RHEL or CentOS system, as that's what I was working with at the time. In particular steps 5 and 6 are likely to be different on your system.

  1. Modify the configuration portion of the script.
  2. adduser analyticsmilter, addgroup analyticsmilter
  3. cp analyticsmilter.py /home/analyticsmilter/analyticsmilter.py
  4. chown analyticsmilter:analyticsmilter /home/analyticsmilter/analyticsmilter.py
  5. Test by running: sudo -u analyticsmilter /usr/bin/python /home/analyticsmilter/analyticsmilter.py

If you send an e-mail to one of the e-mails specified in Step 1, you should be able to see the milter working in real-time!

  1. cp analyticsmilter.service /usr/lib/systemd/system/analyticsmilter.service
  2. systemctl enable analyticsmilter

About

Milter (mail filter) to add Matomo Analytics tracking parameters to Mailman e-mails. Can be edited quite easily for use with Google Analytics, etc.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages