Jump to content
MediaWiki

Extension:XAnalytics/Hooks/XAnalyticsSetHeader

From mediawiki.org
XAnalyticsSetHeader
Available from version 0.1 (Gerrit change 202801)
Add additional items to the X-Analytics header
Define function:
public static function onXAnalyticsSetHeader( OutputPage $out, array &$headerItems ) { ... }
Attach hook:
$wgHooks['XAnalyticsSetHeader'][] = 'MyExtensionHooks::onXAnalyticsSetHeader';
Called from:
File(s): XAnalytics / XAnalytics.php
Function(s): generateHeader

For more information about attaching hooks, see Manual:Hooks .
For examples of other extensions using this hook, see Category:XAnalyticsSetHeader extensions.

Details

[edit ]

Used by the XAnalytics extension to allow other extensions to supply arbitrary analytics data. Fields added to $headerItems will be included in the X-Analytics header of the MediaWiki response. On Wikimedia wikis, they will end up in the x_analytics_map array in the webrequest table. See wikitech:CDN/Headers.

AltStyle によって変換されたページ (->オリジナル) /