isUserIsSuperUser()){ echo 'You have superuser privileges!'; } else { echo 'You are not a superuser.'; } ?>
isUserIsSuperUser()){ // Allow access to the plugin for superusers $view = Piwik_View::factory('MyPlugin'); echo $view->render(); } else { // Redirect to the login page for non-superusers Piwik_Url::redirectToUrl('index.php'); } ?>In terms of package library, Piwik is a standalone application that provides its own API and plugins. However, it can also integrate with other PHP frameworks such as Symfony, Laravel, and CodeIgniter using the Piwik PHP Tracker.