@mattab opened this Issue on September 30th 2014 Member

The goal of this issue is to include a new small feature in piwik.js that will let French users of Piwik respect the best standards of privacy according according to CNIL recommendations.

When Piwik is configured to be compliant with CNIL recommendations then Piwik users in France do not need to display the cookie consent banner. This is a huge benefit to Piwik users!

To be compliant French Piwik users must:

  • Anonymise IP address in your Piwik (at least two bytes)
  • Display the opt-out iframe in your website(s)
  • Configure JS Tracker so that Cookies lifetime are not extended on each visit
    • Currently the tracking cookies are extended on each pageview and will expire 2 years after the last pageview.
    • What CNIL recommends is that all cookies must expire 13 months after the cookie was initially created and should not be extended.

The code used to achieve this is:

_paq.push([function() {
  var self = this;
  function getOriginalVisitorCookieTimeout() {
    var now = new Date(),
    nowTs = Math.round(now.getTime() / 1000),
    visitorInfo = self.getVisitorInfo();
    var createTs = parseInt(visitorInfo[2]);
    var cookieTimeout = 33696000; // 13 months in seconds
    var originalTimeout = createTs + cookieTimeout - nowTs;
    return originalTimeout;
  this.setVisitorCookieTimeout( getOriginalVisitorCookieTimeout() );


  • Let's make this feature built-in Piwik.
  • add unit test
  • Notify CNIL when new version of Piwik is released, maybe they can update instructions
@Taenvan commented on October 10th 2014

I fully support he Mattab's proposal, I'm a French user of Piwik and I think this option should be considered to meet the recommandations of the CNIL. From October 2014, The CNIL has decicidet to audit websites.

@mattab commented on October 12th 2014 Member

cnil tweet

@tsteur commented on October 14th 2014 Member

It should work now :) @mattab Can you notify CNIL, update FAQ etc and close afterwards?

@mattab commented on October 14th 2014 Member

Awesome, that's a big win for all French users of Piwik & for Privacy! :+1:

@mattab commented on October 29th 2014 Member
This Issue was closed on October 14th 2014
Powered by GitHub Issue Mirror