PHP logging

EventLogging::logEvent( 'AnonymousUserSiteUsage', 5311406, $event );

extension.json setup for JavaScript logging

{
	"attributes": {
		"EventLogging": {
			"Schemas": {
				"AnonymousUserSiteUsage": 5311406
			}
		}
	}
}

JavaScript logging

mw.track( 'event.AnonymousUserSiteUsage', { /* ... */ } );

Schema:AnonymousUserSiteUsage

From Meta, a Wikimedia project coordination wiki
Revision 5311406
Jump to navigation Jump to search
description"Logs anonymous users usage of the site. See http://meta.wikimedia.org/wiki/User_site_behavior_collection"
properties
sample_rate
type"integer"
requiredtrue
description"Downsampling factor currently in use"
session_count
type"integer"
requiredtrue
description"Number of sessions seen from the user"
avg_inter_session_time
type"integer"
requiredtrue
description"Average number of seconds between sessions"
avg_session_pages
type"integer"
requiredtrue
description"Average number of pages seen by the user in a session"
avg_inter_page_time
type"integer"
requiredtrue
description"Average amount of time between page requests in a session"
max_inter_page_time
type"integer"
requiredtrue
description"Maximum amount of time seen between page requests in a session"
min_inter_page_time
type"integer"
requiredtrue
description"Minimum amount of time seen between page requests in a session"
project
type"string"
requiredtrue
description"WMF project this statistic was collected from (e.g. wikipedia)"
language
type"string"
requiredtrue
description"Language of the project (e.g. en)"
country
type"string"
requiredtrue
description"GeoIP country of the statistic (e.g. US)"