Extension:XAnalytics/Hooks/XAnalyticsSetHeader
Appearance
From mediawiki.org
(Redirected from Manual:Hooks/XAnalyticsSetHeader)
XAnalyticsSetHeader
Define function:
public static function onXAnalyticsSetHeader( OutputPage $out, array &$headerItems ) { ... }
Attach hook:
$wgHooks['XAnalyticsSetHeader'][] = 'MyExtensionHooks::onXAnalyticsSetHeader';
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.