OPT-OUT by default


#1

Dear friends,
I installed your tracking system in my site a few days ago and I’m very surprised with it. It’s awesome!!!

It’s working perfectly. Thank you very much.

I’d like to ask you how can I change the default setting of ‘opt-in’ to ‘opt-out’ in the page below:

‘Settings’ > ‘User settings’ > ‘Exclude your visits using a cookie’.

The default instance/option/link is like this: ‘› Click here to set a cookie that will exclude your visits on websites tracked by Piwik on [URL]…’. (OPT-IN by default)
So, I’d would like to have the OPPOSITE: ‘› Click here to delete the cookie and have Piwik track your visits’. (OPT-OUT by default)

This means that when we enter the site the script set a cookie that immediately prevents the Piwik system tracking.
So I could create a prior page to set this cookie before entering our site or the site with the Piwik system installed.

Now I’m using a temporary HTML page with the privacy iframe to optionally set the cookie, and a link to the main site and another link to the Piwik website.
It would be very nice if the default option was opt-out (UNCHECKED box).
How can I change that iframe to do so (and translate it to my language (Pt-BR))?
There’s no anonymous users for while. Now we are only four “admins” and we most of times forget to set the cookie. :frowning:

I’ve tried to find the answer in you site but there are lots and lots of questions/answers by other users.
I’ve searched for the answer looking inside the files of Piwik knowledge base but I’ve got lost.

Could anyone tell me where do I change that option?

I’d like to thank you a lot for everything in advance.

Best regards,

Marcos


(vipsoft) #2

the checkbox state flips depending on whether or not the exclusion cookie is present

Your proposal requires a new iframe and logic; it’s doable but unconventional


#3

Hi, vipsoft ! Thanks for your answer

I know about the state of the ‘checkbox’.

Yes, I’d like to ask Piwik to set an exclusion cookie for a user’s browser before he/she has visited the site, but ONLY for the administrators of the site.
To make it simple as I described above, I created an HTML page with the ‘privacy iframe’.
There, we can opt track or not our visits (admin) BUT with that ‘checkboxunchecked by default.
After this procedure we can visit our site or Piwik statistics through two links or buttons on that HTML (prior) page (one to the main site, other to the Piwik).
This would appear to sound silly but when we are in a hurry, we forget to set the cookie.

I’ve tried changing the file "~\piwik\plugins\CoreAdminHome\templates\optOut.tpl (line 20 - to unchecked state) but it haven’t worked.
I’m missing something…
I’m not an expert! :S

Obs 1: It has no relation to the widget with privacy iframe we can put inside our site to normal visitors, of course.

Obs 2: I’ve found the translation page to change to Brazilian Portuguese the language of the iframe.

Thank you for your comprehension!

[ ]'s



(Matthieu Aubry) #4

What you can do, is “set” the ignore cookie in your website (assuming it it the same host as the piwik domain)… look at the name of the cookie and set the same name/value and all users will be ignored


#5

OK, friends. I’ll try that.

Thanks to all of you and…

…a GREAT NEW YEAR! :)-D


#6

the opt-out cookie by Piwik is:

name: piwik_ignore

content: ignore%3DczoxOiIqIjs%3D%3A_%3D61b3fde511c1c1112d5787158016eb3400262326
not so simple… I don’t know wich value means what

path: /piwik/ in Firefox
in Chrome becomese /piwik, I don’t know wich is the most correct syntax
the name of the folder where I installed Piwik

this cookie can be created in javascript


<script>
document.cookie = "piwik_ignore=big_string_above; expires=31 Dec 2015 12:00:00; path=/piwik/"
</script>

or in php


<?php 
setcookie('piwik_ignore', 'big_string_above', time()+60*60*24*999, '/piwik/');
?>

pay attention the php setcookie must be before every output