German privacy acts demand fulfilling three requirements when sending mass mailings using tracking technology and I wonder how to achieve this. Because I think CiviMail's and CiviCRM's core and therefor all german users would benefit from a generic solution, I'd prefer handling this in civi itself. But walking the customization way is an option too.

  1. Pseudonymization

    The tracking information has to be detached from all data which may identify the corresponding contact.

    AFAIK civi does not provide such a possibility or does it?

    How could we hook into database and reports to cut the link between tracking information and the civi contact? If the link is just a civicrm_contact_id in a tracking table, could we create a pseudonymic fake contact and generally override the db field with it's id?

  2. Ability to contradict

    The possibility to opt-out from tracking is mandatory.

    How to implement a new communcation setting named somethin like "Do-not-track" besides "User opt-out" which tells the system to not insert tracking links or beacons in a contact's mails?

    Or – as a customization approach – should we add a custom field, edit it in the mails via a link to a custom extension's function and read it using some thing like hook_civicrm_alterMailContent?

  3. Transparency

    Users have to be informed about all tracking that is done. Easy as it is a just a matter of text. But maybe we could add a default snippet.

Any help appreciated.

2 Answers 2


I don't think there is a way to achieve "pseudonymization" without having to touch code (except for turning off tracking altogether). However, implementing what you suggested, i.e. assigning the tracking events to a predefined contact ("Anonymous") one way or another, should be reasonably easy for a developer.

Adding on do-not-track flag is a different story though, that entails a lot of little changes throughout the system. It also raises questions like "if I set this flag for a contact, do we want to keep the previously gathered data?" or "should that flag also affect bounce processing?".

You might also consider doing this as an extension at first, because it will take a while to be released in an official CiviCRM version. Plus, you could make sure it's working and well thought-out.

  • AFAIK you're somehow engaged in german civi scene. Do you know about solutions regarding this legal issue?
    – nielo
    Commented May 7, 2016 at 20:37
  • No, most people having concerns just turn it off. Catorghans suggestion seems good as well, but of course it would be better to have CiviCRM deal with the problem by itself. Recently there has been some activity in this area, maybe @DetlevSieber knows more about this. Commented May 9, 2016 at 6:20

Easiest would be to not track via CiviCRM. But track via Piwik (www.piwik.org).

You would get info about how much people visit your site from the Mailing (via https://piwik.org/docs/tracking-campaigns/#tracking-campaigns-using-url-parameters), but you would not see how much people opened the mail or who clicks which link.

Piwik has all the opt-out options you need.

  • mhmm, we do use piwik, I'll have a glance on it...
    – nielo
    Commented May 4, 2016 at 20:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.