Currently on the admin page we have the choice of the specific roles we want to be tracked.
The problem is that if you check the default "authenticated user" role, all other roles except anonymous will be tracker.
In consequence, if you want to have authenticated users tracked but not admins, you must create a custom role for authenticated users.
Making it the other way around would solve this :
Make all roles tracked by defaut and check the specific roles you want excluded.
Of course now, if you wanted to track admins or other specific roles but *not* authenticated users, you'd have to create a custom authenticated users role... But this is a very unusual case.
Comments
Comment #1
hass commentedhttp://drupal.org/node/261997
Comment #2
Ovocean commentedOk so there is another workaround, fine, but please tell me what's the advantage of having these settings that way and having to rely on workarounds to get the most common behaviour people need?
The change in the code to revert the setting is extremely simple and has no secondary effect. Though when upgrading, people must be warned that they have to change their settings.
Patch attached is against HEAD.
Thanks.
Comment #3
hass commentedThe path filed works like ALL visibility fields in core. This is the reason and we had your variant in past and nobody have understood it. This is why it has been removed in Google Analytics and the stuff change to work in a common way that everyone knows. I explained this more than once in GA queue. You can find the reasons over there.
This will not change until core will change. If you can get such a patch in core the module will follow core.
Comment #4
Ovocean commented1) This is about the Roles filter, not the "path filed" (Path filter, I suppose).
2) I've search the GA's issue queue for "role" and spent one hour to read ALL the closed issues relating to this. There are indeed a lot of them but you know what ? ALL of them are about the way it works now, and people don't get it. I have not found a single one about 'my variant that you had in the past'.
3) I won't patch block visibility in the core because it works AS GENERALLY EXPECTED, which is the opposite of the expected behaviour for user tracking : Why would you want a block that authenticated users can see but not the admin ? No, you generally want to make a specific bloc visible for a specific role and then the intuitive thing is to only check that role in the visibility setting. While for user tracking, you generally just want to exclude the staff and the intuitive thing is to only check that role for exclusion.
4) The best solution here − and the one that will stop boring people like me to annoy you − is then to offer both behaviors with radio buttons (with default to whatever you want...). Just copy those radios from the Pages/path filter, it would be perfect ! Wouldn't it ?
5) Can we stop shouting and being rude ? Being upset is not healthy and serves nothing.
Comment #5
Ovocean commentedChanged status...
Comment #6
hass commentedYou must search in 5.x issues. The problem is to follow the postings is not easy as you must keep in mind how bad/broken the module was before 5.15. If you understood how it worked you may understand the questions. For example the module have not tracked anything by default. People have not understood (and me too) what the checkboxes are doing and asked very often how to configure the module to make it working/tracking anything. It was a mess to get it working. I cleaned up all this UI stuff, re-wrote many things and after this change the userinterface was understandable and worked how people expected it. The cases have dropped to zero. You are the first within ~2 years and this is also the reason why don't think it's important.
#248075: Tracking based on user and role specific settings
#258981: Documentation patch
#260367: Roles Opt-Out Sample PHP Script With Path Settings Functionality Preserved
#232841: role authenticated user selected
#134422: Allow certain roles to NOT be tracked
Always keep in mind - over 110.000 installations understand the current logic without asking how it works. Your code change will never go in as it simply flips the current logic - leaving 120.000 installations standing in the rain with an upgrade path. If something can go on it is a VERY GOOD user interface change that does not bring up one question to 1.000.000 people and have update hooks implemented if required and tests. You should carefully check out the code how roles, user and path logic interact. This is no trivial task.
Comment #7
Ovocean commented« You must search in 5.x issues. The problem is to follow the postings is not
easy as you must keep in mind how bad/broken the module was before 5.15 »
I've searched and read issues in all versions, there is nothing to understand but to see that the only complaints or misunderstanding that have been raised are about your new logic.
The five issues you've just posted show nothing or are just backing what I say :
#248075: Tracking based on user and role specific settings :
So here Todd Nienkerk says "hooray" at first, but read his last comment... And then Hunvreus also follows my point of view, he even proposed the same solution I proposed in my last message. 2,5 years ago. I feel like an archeologist. :)
#258981: Documentation patch :
What does it show except that you didn't put a clear warning when you changed the logic and that many people lost data ? I still see no complaint about the old logic here.
#260367: Roles Opt-Out Sample PHP Script With Path Settings Functionality Preserved :
This is your workaround snippet, and ? Anything in the comments ? No.
#232841: role authenticated user selected :
Here, someone needing confirmation that your new logic works as the inline help says. Any complaint about the old logic ? No.
#134422: Allow certain roles to NOT be tracked :
Here, some guys who request the same behavior as me...
« The cases have dropped to zero. You are the first within ~2 years »
July 2010 | May 2010 | January 2010 | December 2009 | September 2009
(To find these ones I searched for "RTFM". Haha.)
« Always keep in mind - over 110.000 installations understand the current logic without asking how it works. »
Most people don't think by themselves, they see the workaround and are satisfied with that, thinking that you know your job better than them. The others either don't see the problem or have better things to do than reporting the issue or have found a workaround themselves. The rest report the issue, it's been posted 5 times in one year. In the same period, about 130 issues have been posted in total, so it's not negligible at all, considering that its not a critical issue and it has workarounds.
« Your code change will never go in as it simply flips the current logic - leaving 120.000 installations standing in the rain with an upgrade path»
You've already done this yourself...
And read again post #4 please, where I propose to add the opposite logic as an option, so it won't change anything when updating the module !
« You should carefully check out the code how roles, user and path logic interact. This is no trivial task. »
I've carefully checked the code and it's completely trivial.The modification doesn't get out of the _piwik_visibility_roles function's scope, which will continue to return TRUE for roles that must be tracked and FALSE for the other ones, that's all.
Comment #8
hass commentedThe job is not done by writing exclude for add and flipping variables. You have not understood the issues. E.g Tod asks how he is able to get the module up and running. Usability was a mess in past. Others in the case confirmed the change is good. It may be best if you install 5.x 1.2 and try to understand how it worked and than try to understand how many possibilities you have with the current versions.
Only for the reason that I made a big mistake and have not implemented an upgrade path in past doesn't mean that I make such faults again. Finding users complaining about a missing upgrade path doesn't mean they do not understand the current UI. The number of installations have also grown by ~110.000 users from ~2000 and issues are nearly zero since the UI changes. Find one top 10 module with 4 open issues.
Comment #9
Ovocean commentedRead again ! Todd posted his issue after you reversed the logic. You released 5.x 1.4 in February 2008, then Todd posted his issue in April 2008.
His first two posts are not cristal clear but he says that he doesn't want that all custom roles get tracked whenever he checks authenticated users (which happened because of your logic reversal). Then you say that you'll post a patch and Todd thinks "oh cool, it will be fixed in the module code soon, I'll be able to check auth users and uncheck admin, and admin won't be tracked", but he didn't read well and it never happened. So, later in june 2008, after v1.6 (and the UI overhaul) was out, he came back and said "hey, I thought it was fixed but it's not, why do we still stick with this useless logic ?"
Anyway, this week I'm gonna roll that patch, and we'll see.
Gute Nacht
Comment #10
izmeez commentedPlease allow me to jump in.
First, thanks very much for the Google Analytics module. It is very useful.
My experience as a user of Drupal and Google Analytics is that configuration of Google Analytics would be more intuitive with the feature request as suggested by Ovocean if the patch in #2 works and I don't think it would reflect adversely with the user interface found elsewhere in Drupal.
The problem is well described in the opening post of this issue and I agree it is an obstacle to ease of administration. It would be far easier to do as suggested, since tracking can be on for all users, allowing selecting which roles to exclude.
Yes, there is a workaround, the php as linked to in #1. We have been using this for some time since we found it and were grateful for it. But it is a more advanced technique not suitable for ordinary administrators.
I must admit I don't fully understand the significance of the phrase "preserve the standard path filter functionality" and therefore don't understand why the user interface or user experience should be limited by it.
It would also be nice to be able to exclude user 1 from tracking.
As a side note, in the process of upgrading from 6.x-2.2 to 6.x-3.x-dev I found the php code caused errors in watchdog related to user 1.
Thanks,
Izzy
Comment #11
hass commentedYou can exclude user 1 and ever other user you'd like for years.
Comment #12
izmeez commented"You can exclude user 1 and ever other user you'd like for years."
I presume you mean using the role permissions and or the php to exclude roles and assign a role to user 1.
Yes, it has been possible to do this for years. It's more a question of what is the best way to make that available.
Thanks,
Izzy
Comment #13
hass commentedNO. enable users are able to opt out and go to the user page, uncheck tracking. Every user with opt out permission can do this. You should spend 3 minutes with reading descriptions to understand the module or take a look to the screencasts. They are made for you.
Comment #14
izmeez commentedhass, Yes, thank you I do understand granting user permissions to specific roles to configure opt out.
And I have read much of the documentation on this module in the two years I have used it. And have been able to use the workarounds provided to achieve the required results.
Thanks very much for all your work. But I find your remarks unnecessarily condescending. I've certainly spent way more than 3 minutes readings descriptions, issues and tutorials on this module.
Izzy
Comment #15
hass commentedSee http://www.brianstevenson.com/drupal/screencasts/installing-googleanalytics and you know how to opt out user 1. Reading and confuguring Drupal would have solved the issue, too. All interfaces in drupal works this way. If you are able to configure one you can all.
What are you not understanding regarding opt out?
Comment #16
izmeez commentedMy use case was similar to ovocean, I needed to exclude some roles from tracking, namely the administrator and developer. I thought it would have been nice if the UI check boxes had the option to exclude by role but they did not. I did not want individual users to do this. I installed the php script and that seems to do the job.
I wasn't entirely clear, with the php script in use, do the user permissions for all roles need to be set to "use php for track visibility" or is this just for the roles that need to be able to administer google analytics?
Thanks,
Izzy
Comment #17
hass commentedThe page A beginner's guide to using snippets may be a good starting point for you and PHP snippets can also help.
Comment #18
izmeez commented@hass
Thank you those are useful links and confirm what I am doing.
I am still not entirely clear on the user permission settings.
I initially presumed the item permitting users to "use php for tracking visibility" only needed to be checked for developers or administrators to make the necessary configuration changes. But on seeing the beginners video I wondered if this permission must be checked for all roles?
Thanks for your responses and patience,
Izzy
Comment #19
hass commentedAs i know this permission is only required for admins for configuration.
Comment #20
Ovocean commentedPatch against 6.x-3.x-dev. Seems to work against 3.0 too.
I repeat, this is just adding an option, it won't modify the current settings.
Please review, thanks.
Comment #21
hass commentedD7 first, than backport.
Comment #22
hass commentedThere is a tab.
We also need tests.
Comment #23
hass commentedNeeds work for tests, tab and D7.
Comment #24
Ovocean commentedD7 version, no tab.
Regarding tests, I've tried all possible combinations with the roles and roles visibility settings on the D7 version, it works as expected. If something more serious is needed, I hand the job over to someone more experimented. The documentation on testing patches left me clueless...
Comment #25
izmeez commentedNot to take anything away from the clarifications on using php to track visibility provided by hass, which were helpful.
I have applied the patch in #20 to 6.x-3.x-dev without difficulty. This patch does not change the default functioning but provides the additional option to exclude specific roles. I think this patch makes the UI more intuitive for those who need to exclude certain roles.
The option "add to selected roles only" may need to be modified to remove the word 'only' to be in-keeping with the explanation provided below the check boxes.
Thanks,
Izzy
Comment #26
Monzer Emam commented@Ovocean
I completely agree with you and with your patch. Actually I was planning to do same but for 6.x-3.0.
Comment #27
izmeez commentedJust another brief comment on the patch.
Below the check boxes for roles, in the explanatory comment, it may be helpful to include "To exclude user1 assign an excluded role to user1."
Although, I still lean towards having a check box for user1 for simplicity.
Thanks,
Comment #28
hass commented@izmeez: Why are you still refusing to read and follow #13?
Comment #29
izmeez commented@hass I have read #13. It is again based on assigning permissions to a role in order to exclude user1. I understand the way YOU choose to do things. I have dealt with this myself for more than two years that I have been using this module, using the instructions in the various documentation. While I appreciate the module and find it very useful, I really do not understand your persistence in denying there may be ways to improve it. I do not understand your rigidity. YES, I have user1 excluded and have done so for over two years. I am just suggesting ways to make this clear in relationship to this patch.
Comment #30
Monzer Emam commentedI appreciate the module and find it very useful ALSO.
And I have read #13,but I agree with @izmeez about "having a check box for user1 for simplicity".
Also in module install for new sites the "exclude user1" check box should be checked by default.
Comment #31
hass commentedRoles are groups of users and user 1 is only a single user and not a group. We do not write special cases only for user1 or any other user. The way how it's possible to exclude single users is perfect. The is no need to mix groups with users logic. This will not happen.
Comment #32
Ovocean commentedHass, I'm sorry but I really feel like you don't have the profile right now to be an open source code maintainer. You may be a very good coder but you miss the most important criteria for managing an open community : being open minded, open to suggestions, open to changes, open to compromises, understanding, respectful.
The way you are, you're mostly just a break on this module's progression. If the module is perfect to you, just stop working on it, because it is NOT perfect for many others and you can't prevent them indefinitely to improve it the way they need.
With more than 200 000 users, there will be someone to take up the role if you step down, you're not forced into it at all.
Comment #33
Monzer Emam commentedHi, All
I think discussion is healthy thing for all of us.
@hass
when I agreed/proposed to add a check box for user1 I didn't say where it should be done. Actually I think the best place for that check box is under "User specific tracking settings"
Also the option "Do not track users by default, but let individual users to opt in." will give each other user the ability to disable tracking from himself to speed up page loading (I know it can be managed by "Permissions" ) But I think why make it complex while no need at all.
Comment #34
hass commented@Monzer Emam: Users cannot control whether they are tracked or not. may not the best default and we may be able to change this to Track users by default, but let individual users to opt out.. This is something I'm changing myself on really every of my sites. The reason for the current default is the default blocks visibility setting where the first radio is the default. Excluding user 1 or other individual users from tracking is something that will mostly be done on small sites (and path based exclusion too). Others may use a role or track only anonymous users. Bigger sites may not care about the few "user 1" clicks and this is also not wrong as these are clicks on your site. With the second item selected by default we may show the opt out checkbox in user settings and less beginners may find it quicklier without reading. The permissions behind are only logic - not every user should have permission to opt out and there are good examples why and when this makes sense. The permissions may look a bit strange if it comes to Do not track users by default, but let individual users to opt in., but it's only a logic consequence (nevertheless You may not need it) and will also catch all edge cases we could ever think about. I see no reason to remove functionality - edge case or not - we will find someone who will request these edge case. :-)
@Ovocean: We cannot help someone who have shown in more than one issue that he may not understand software or code at all and that he cannot read documentation and/or view screencasts. If he would - he would have opened a editor, have analyzed the code, found what he is doing wrong and than reported a usability issue - if it would really exists - maybe with an example how it could be made better. Cluttering translatable strings with unrelated descriptions is really the wrong way. I'm still trying to get a very small idea how someone can think that a "role" is a "user" - except you have upgraded from 5.x-1.3. I'm open to all possible usability issues, but not if people refuse to read setting "names" and their "descriptions" and cannot explain what they do not understand or what is not working and what they have configured as non-default. Sometimes you have very good and helpful reports and more often not so good or very bad. A module cannot be easier than GA - enter a Web Property ID and press Save and you are done! Yes, someone can missconfigure this module, but this cannot prevented at all if others like to have some good features. As always - reading is required - you will always have such users that cannot read or are doing everything wrong that can be done wrong.
In general I will not commit code that will clutter clean logic nor will I commit code that makes code unmaintainable as I need to maintain it on the end of the day. Open Source and Community is great, but there are mostly leachers that cannot develop code and I do not like to make code, descriptions or documentation illogical and unmaintainable only to make one person happy in a short view and confuse thousands of others. You cannot make everyone happy. I'm fine with 98.7% or more.
You may have missunderstood something - I'm not against new features - only for an intuitive and clean user interface for all features and not for making things more complex than they should be. And always keep in mind that you are also able to make text BOLD and it's nevertheless not read... this module is really much more fool-proof than hundreds of other modules.
PS: You patch could have already been committed, but without proper tests... How about not wasting time with OT complaining?
Comment #35
Ovocean commentedI give up trying to move a wall.
Re PS : #24 "Regarding tests, I've tried all possible combinations with the roles and roles visibility settings on the D7 version, it works as expected. If something more serious is needed, I hand the job over to someone more experimented. The documentation on testing patches left me clueless..."
Comment #36
izmeez commented@hass, I like your module but I'm tired of your attitude. I think it gets in the way of people trying to contribute to the discussion and further understanding and improvements. Maybe someday I can buy you a beer and we can both see that we're really all trying to contribute for the common good.
Comment #37
Monzer Emam commented@hass: Thanks for your time and your answers.And regarding your answer in #34
- I agree with you and since this issue is about roles I will make a new issue for user1 with new idea.
- Also I agree with you at #3 , But I hope you agree to agree with me to by pass "
This will not change until core will change. If you can get such a patch in core the module will follow core."As yes core should change And I will submit issue in this regards.
But for our module I propose a change like the image attached.
- may be @Ovocean patch need changes/test as just looked at the code and didn't read it fully or test it.
But is the new concept itself accepted from your side - still you are the one who will maintain the code end of day :).
Comment #38
hass commentedI'm fine with the #24 patch, but I'd like to see automated tests for this.
Comment #39
hass commented.
Comment #40
hass commented.
Comment #41
hass commentedNext release date is scheduled for 5. Jan 2011. Any chance to get tests?
Comment #42
hass commentedRe-adding ignored patch
Comment #43
hass commentedComment #44
hass commentedPrevious patch will fail. Re-roled.
Comment #45
hass commentedAnd fixed the description bug
Comment #46
hass commentedCNW for tests.
Comment #47
hass commentedCommitted updated patches with tests.
Comment #49
jasonluttrell[deleted]