This is the documentation for concrete5 version 5.6 and earlier. View Current Documentation

While the Dashboard Statistics graph can be a useful tool for determining how much traffic your site receives, it can be a bit of a page-load-time hog. Perhaps you've downloaded another add-on that tracks stats, and you're tired of waiting for it to load? Perhaps you're using something like Google Analytics or Mint instead? If you're looking to a way to speed up Dashboard load time, disabling the Stats graph is something you'll want to consider.

Stats Graph

The graph is loaded by /concrete/single_pages/dashboard/view.php. First, copy the file up into /single_pages/dashboard/ and make your edits there. This way, we'll leave the core c5 files intact for upgrades (and in case anything goes awry).

Then, we'll simply comment out the echo statement that loads the module. Change:

<div class="ccm-module">
        <h1><span><?php echo t($modules[1]->dbhDisplayName)?></span></h1>
        <div class="ccm-dashboard-inner"><?php echo $dh->output($modules[1])?></div>
    </div>

to

<div class="ccm-module">
        <h1><span><?php echo t($modules[1]->dbhDisplayName)?></span></h1>
        <div class="ccm-dashboard-inner"><?php /* echo $dh->output($modules[1]) */ ?></div>
    </div>

The next time you visit your site's Dashboard, your stats display will remain unloaded.

Please note that your site is still collecting stats-- it's just not displaying them every time you load the Dashboard. To stop your site from adding new traffic data to the database, edit /config/site.php and add the following line:

define('STATISTICS_TRACK_PAGE_VIEWS', false);

See this thread for a more in-depth explanation.

If your site is still slow, clearing out the existing stats may help. Open phpMyAdmin (or whatever you use to edit your database) and run the following SQL query:

truncate table PageStatistics;

Please note that this will blow out / destroy whatever's been collected so far-- so be sure you don't need that data before running the query. See this thread for more information.

Loading Conversation