Get Started

Configuration

You can customise Asset Count’s settings using a PHP configuration file. This is optional: each setting has a default, so you only need to include the values you want to change.

To override a setting, create asset-count.php in your Craft project’s /config directory and return an array of setting names and values. For example, the following will ignore downloads identified as bots:

<?php

return [
    'ignoreBots' => true,
];

All other settings keep their defaults. Add any further settings you want to change to the same array. The options below explain the available settings and their defaults. You can also manage these settings in the control panel under Settings → Asset Count.

Configuration Options

showCountOnAssetIndex

Will add a new column for the asset count on the asset index pages.

ignoreIpAddresses

Add one IP address per line to ignore them when incrementing counts.

ignoreLoggedInUsers

Only increment counts if users are not logged in.

ignoreBots

Only increment counts if the request does not appear to be from a bot, crawler or spider.