Disable Google Analytics by Role, User, or nid
If you utilize the code to disable Google Analytics by role or user within the module, it leaves you no easy way to exclude individual nodes. Getting the node id (nid) and adding a few extra lines of code that will check against a predefined array results in new code: <?php global $user; // These are the roles, uid, and nid which should not see this module $notallowed_role = array('Administrator','Contributor','Forum admin'); $notallowed_uid = array(1,8); $notallowed_nid = array(1,2,3); // Assume they can see it to start $valid=TRUE; // Go through each ...
Read more