require_once 'PiwikTracker.php'; try { $piwikTracker = new PiwikTracker( $idSite = 1, $piwikUrl = 'http://example.com/piwik/' ); $piwikTracker->setTokenAuth('xyz123'); $piwikTracker->setIp($_SERVER['REMOTE_ADDR']); $piwikTracker->doTrackPageView(); if ($piwikTracker->checkUserIsNotAnonymous()) { // User is logged in, show personalized content } else { // User is anonymous, show generic content } } catch (Exception $e) { echo 'Caught exception: ', $e->getMessage(), "\n"; }In this example, the PiwikTracker object is initialized with the ID of the website being tracked, the URL of the Piwik installation, and an authentication token. The doTrackPageView() method is then called to record a page view. The checkUserIsNotAnonymous() method is then called to determine if the user is anonymous or not. If the user is not anonymous, personalized content can be displayed based on their user account. If the user is anonymous, generic content can be displayed. The Piwik PHP Tracking Client is a standalone package library that can be downloaded from the Piwik website or installed via Composer.