我在 php 中使用服务器端分析代码将 Google Analytics 与我的网站集成。
use UnitedPrototype\GoogleAnalytics;
// Initilize GA Tracker
$tracker = new GoogleAnalytics\Tracker('UA-XXXXXX', 'XXXXX.com');
// Assemble Visitor information
// (could also get unserialized from database)
$visitor = new GoogleAnalytics\Visitor();
$visitor->setIpAddress($_SERVER['REMOTE_ADDR']);
$visitor->setUserAgent($_SERVER['HTTP_USER_AGENT']);
$visitor->setScreenResolution('1024x768');
// Assemble Session information
// (could also get unserialized from PHP session)
$session = new GoogleAnalytics\Session();
// Assemble Page information
$page = new GoogleAnalytics\Page($_SERVER['REQUEST_URI']);
$page->setTitle('My Page');
// Track page view
$tracker->trackPageview($page, $session, $visitor);
问题是,昨天它在网站上显示实时用户,但今天网站上显示的总访问量为零。这个服务器端实现是否有问题。?