Tracker-proxy and optout

Hi everyone,
is there a possibility to use tracker-proxy and any kind of optout cookie (lokal piwik_ignore.tpl)?
My piwikserver is placed into a intranet. All webservers are located in internet and haven’t directly
access to piwik.
Piwik and tracker-proxy works fine, but our visitiors need the opportuny to disagree tracking.

Thanks Adolar

Entrys in config.ini.php
assume_secure_protocol = 1
proxy_client_headers[] = HTTP_X_FORWARDED_FOR
proxy_host_headers[] = HTTP_X_FORWARDED_HOST

host = ""
port = PortNr…

my local “piwik_ignore.tpl” work’s fine and generate the “piwik_ignore” cookie. But whatever, piwik tracking is active…


<input type="checkbox" value="ignore_me" name="ignore" onclick="changeIgnoreState()" id="ignore">
<label style="font-family: Arial;font-size: 85%;" for="ignore"><strong>Besuche von dieser Website mit diesem Browser von der Websiteanalyse mittels Piwik ausschlie&szlig;en</strong></label>
<script type="text/javascript">
    if (document.cookie) {
        a = document.cookie;
        if (a.indexOf('piwik_ignore') == -1)
            document.getElementById("ignore").checked = false;
            document.getElementById("ignore").checked = true;
    function changeIgnoreState() {
        b = new Date();
        if (document.getElementById("ignore").checked == false) {
            c = new Date(b.getTime() - 1000*60*60*24*365);
            document.cookie = 'piwik_ignore=; expires='+c.toGMTString()+';';
        else {
            c = new Date(b.getTime() + 1000*60*60*24*365*1000);
            document.cookie = 'piwik_ignore=; expires='+c.toGMTString()+';';
1 Like

Please check this alternative and separate and independently Matomo OptOut:


You can see the current status here:

The latest version at least supports forwarding the DNT header.