-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgoogleAnalytics.php
More file actions
49 lines (37 loc) · 2.05 KB
/
googleAnalytics.php
File metadata and controls
49 lines (37 loc) · 2.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<?php
if ( !defined( 'MEDIAWIKI' ) ) {
die( 'This file is a MediaWiki extension, it is not a valid entry point' );
}
$wgExtensionCredits['other'][] = array(
'path' => __FILE__,
'name' => 'Google Analytics Integration',
'version' => '3.0.1',
'author' => array( 'Tim Laqua', '[https://www.mediawiki.org/wiki/User:DavisNT Davis Mosenkovs]' ),
'descriptionmsg' => 'googleanalytics-desc',
'url' => 'https://www.mediawiki.org/wiki/Extension:Google_Analytics_Integration',
);
$wgMessagesDirs['googleAnalytics'] = __DIR__ . '/i18n';
$wgExtensionMessagesFiles['googleAnalytics'] = __DIR__ . '/googleAnalytics.i18n.php';
/*** Default configuration ***/
// Google Universal Analytics account id (e.g. "UA-12345678-1")
$wgGoogleAnalyticsAccount = '';
// Don't store last octet (or last 80 bits of IPv6 address) in Google Universal Analytics
// For more info see https://support.google.com/analytics/answer/2763052?hl=en
$wgGoogleAnalyticsAnonymizeIP = true;
// HTML code for other web analytics (can be used along with Google Universal Analytics)
$wgGoogleAnalyticsOtherCode = '';
// Array with NUMERIC namespace IDs where web analytics code should NOT be included.
$wgGoogleAnalyticsIgnoreNsIDs = array();
// Array with page names (see magic word {{FULLPAGENAME}}) where web analytics code should NOT be included.
$wgGoogleAnalyticsIgnorePages = array();
// Array with special pages where web analytics code should NOT be included.
$wgGoogleAnalyticsIgnoreSpecials = array( 'Userlogin', 'Userlogout', 'Preferences', 'ChangePassword' );
/* WARNING! The following options were removed in version 3.0:
* $wgGoogleAnalyticsAddASAC
* $wgGoogleAnalyticsIgnoreSysops
* $wgGoogleAnalyticsIgnoreBots
* It is possible (and advised) to use 'noanalytics' permission to exclude specific groups from web analytics. */
/*****************************/
$wgAutoloadClasses['GoogleAnalyticsHooks'] = __DIR__ . '/googleAnalytics.hooks.php';
$wgHooks['SkinAfterBottomScripts'][] = 'GoogleAnalyticsHooks::onSkinAfterBottomScripts';
$wgHooks['UnitTestsList'][] = 'GoogleAnalyticsHooks::onUnitTestsList';