Skip to the content
Documentation

[ViewCountSettings]

No ratings yet

Available since Exponential 6.0.15 (in development, not in a release yet).

Summary

The group [ViewCountSettings] of settings/logfile.ini.

File

settings/logfile.ini; override it in settings/override/logfile.ini.append.php, in a siteaccess or in an extension.

Settings

Setting Default Description
SiteAccessList[] (empty array) Which siteaccesses one run counts. Each reads the access log its own logfile.ini [AccessLogFileSettings] names. Empty: only the siteaccess the run is for (runcronjobs.php -s <siteaccess>), as the cronjob always did. Example: SiteAccessList[]=site
AllSiteAccesses disabled enabled: count every siteaccess of AvailableSiteAccessList[] that has an access log, except the administrations. SiteAccessList[] is not read then.
MatchSiteAccess auto How the lines of a log are given to siteaccesses. auto: by the kernel's siteaccess matching (site.ini [SiteAccessSettings] MatchOrder) when more than one counted siteaccess reads the log, else all lines to the one; enabled: always matched, so a log of several sites counts only the lines of the counted siteaccess; disabled: never matched (every siteaccess of a shared log counts every line).
StateDir (empty) Where the resume state is kept: one file per log, with each siteaccess's place in it. Empty: viewcount below the VarDir of the run's siteaccess. A relative path is below the installation.
LockTimeout 60 How long a run waits, in seconds, for another run that reads the same log.
RotatedSuffixes[] .1; .1.gz; .0 The names of a log's rotated copy, appended to its name. After a rotation the rest of the copy is read first, then the new log from its start. A copy is recognized by its inode or its first line, so a compressed copy (.1.gz) is found too.
MaxLineLength 65536 The longest line read, in bytes. Longer lines are skipped.
LineRegexp (empty) A log format of its own: a regular expression with named groups time, request, status and, optional, host, ip, agent, referer. Empty: the common, combined and vhost_combined formats (Apache, nginx, Plesk, Velocity), recognized by each line.
ViewModes[] (empty array) The view modes counted for /content/view/<view mode>/<node>. Empty: every view mode.
Methods[] GET The request methods counted. Empty: every method.
Statuses[] 200; 304 The response statuses counted. 304 (not modified) is a view of a page the browser had. Empty: every status.
SkipExtensions[] css; js; mjs; map; png; jpg; jpeg; gif; webp; avif; svg; ico; bmp; tif; tiff; woff; woff2; ttf; otf; eot; mp4; webm; mp3; ogg; wav; pdf; zip; gz; tgz; xml; txt; json; webmanifest Paths ending in these extensions are files, not page views.
SkipPathPrefixes[] /var/; /design/; /extension/; /share/; /lib/; /.well-known/; /ezjscore/; /api/; /user/; /layout/; /content/search; /content/download/; /content/edit/; /content/action; /notification/; /shop/; /rss/; /Q/ Paths starting with these are not page views: files, services and module views. They are compared with the path as requested and with the path without the siteaccess's part.
BotUserAgents[] bot; crawl; spider; slurp; scrap; warmer; preview; monitor; uptime; pingdom; curl/; wget/; python; java/; go-http-client; okhttp; libwww; httpclient; headless; lighthouse; facebookexternalhit; feedfetcher; validator; scan Requests whose user agent contains one of these (in any case) are robots, not views.
SkipEmptyUserAgent enabled enabled: a request without a user agent is a robot.

See also

Generated example: logfile.ini [ViewCountSettings]

Added to the reference for Exponential 6.0.15: the 4.x reference had no page for this group. The descriptions are the comment lines of settings/logfile.ini.

Contributors

Comments

Add a comment

Comments are read by a moderator before they appear.