"미디어위키에서 구글 애널릭틱스 연동하기"의 두 판 사이의 차이

GameDic
이동: 둘러보기, 검색
(새 문서: = 다운로드 = = 설치 = = 참고 = https://www.mediawiki.org/wiki/Extension:Google_Analytics_Integration http://www.google.co.kr/intl/ko/analytics/)
 
1번째 줄: 1번째 줄:
 
= 다운로드 =
 
= 다운로드 =
 +
 +
아래 사이트를 통해서 압축되어있는 파일을 받습니다.
 +
 +
https://www.mediawiki.org/wiki/Special:ExtensionDistributor?extdist_name=googleAnalytics&extdist_version=REL1_26&extdist_submit=
  
 
= 설치 =
 
= 설치 =
  
 +
설치 파일을 mediawiki의 extensions 폴더에 복사합니다.
 +
다음 코드를 LocalSettings.php에 추가합니다.
 +
 +
<source lang='php'>
 +
require_once "$IP/extensions/googleAnalytics/googleAnalytics.php";
 +
// Replace xxxxxxx-x with YOUR GoogleAnalytics UA number
 +
$wgGoogleAnalyticsAccount = 'UA-xxxxxxx-x';
 +
// Add HTML code for any additional web analytics (can be used alone or with $wgGoogleAnalyticsAccount)
 +
$wgGoogleAnalyticsOtherCode = '<script type="text/javascript" src="https://analytics.example.com/tracking.js"></script>';
 +
 +
// Optional configuration (for defaults see googleAnalytics.php)
 +
// Store full IP address in Google Universal Analytics (see https://support.google.com/analytics/answer/2763052?hl=en for details)
 +
$wgGoogleAnalyticsAnonymizeIP = false;
 +
// Array with NUMERIC namespace IDs where web analytics code should NOT be included.
 +
$wgGoogleAnalyticsIgnoreNsIDs = array(500);
 +
// Array with page names (see magic word Extension:Google Analytics Integration) where web analytics code should NOT be included.
 +
$wgGoogleAnalyticsIgnorePages = array('ArticleX', 'Foo:Bar');
 +
// Array with special pages where web analytics code should NOT be included.
 +
$wgGoogleAnalyticsIgnoreSpecials = array( 'Userlogin', 'Userlogout', 'Preferences', 'ChangePassword', 'OATH');
 +
// Use 'noanalytics' permission to exclude specific user groups from web analytics, e.g.
 +
$wgGroupPermissions['sysop']['noanalytics'] = true;
 +
$wgGroupPermissions['bot']['noanalytics'] = true;
 +
// To exclude all logged in users give 'noanalytics' permission to 'user' group, i.e.
 +
$wgGroupPermissions['user']['noanalytics'] = true;
 +
</source>
 
= 참고 =
 
= 참고 =
 +
 
https://www.mediawiki.org/wiki/Extension:Google_Analytics_Integration
 
https://www.mediawiki.org/wiki/Extension:Google_Analytics_Integration
 +
 
http://www.google.co.kr/intl/ko/analytics/
 
http://www.google.co.kr/intl/ko/analytics/

2015년 11월 26일 (목) 02:02 판

다운로드

아래 사이트를 통해서 압축되어있는 파일을 받습니다.

https://www.mediawiki.org/wiki/Special:ExtensionDistributor?extdist_name=googleAnalytics&extdist_version=REL1_26&extdist_submit=

설치

설치 파일을 mediawiki의 extensions 폴더에 복사합니다. 다음 코드를 LocalSettings.php에 추가합니다.

require_once "$IP/extensions/googleAnalytics/googleAnalytics.php";
// Replace xxxxxxx-x with YOUR GoogleAnalytics UA number
$wgGoogleAnalyticsAccount = 'UA-xxxxxxx-x'; 
// Add HTML code for any additional web analytics (can be used alone or with $wgGoogleAnalyticsAccount)
$wgGoogleAnalyticsOtherCode = '<script type="text/javascript" src="https://analytics.example.com/tracking.js"></script>';
 
// Optional configuration (for defaults see googleAnalytics.php)
// Store full IP address in Google Universal Analytics (see https://support.google.com/analytics/answer/2763052?hl=en for details)
$wgGoogleAnalyticsAnonymizeIP = false; 
// Array with NUMERIC namespace IDs where web analytics code should NOT be included.
$wgGoogleAnalyticsIgnoreNsIDs = array(500);
// Array with page names (see magic word Extension:Google Analytics Integration) where web analytics code should NOT be included.
$wgGoogleAnalyticsIgnorePages = array('ArticleX', 'Foo:Bar');
// Array with special pages where web analytics code should NOT be included.
$wgGoogleAnalyticsIgnoreSpecials = array( 'Userlogin', 'Userlogout', 'Preferences', 'ChangePassword', 'OATH');
// Use 'noanalytics' permission to exclude specific user groups from web analytics, e.g.
$wgGroupPermissions['sysop']['noanalytics'] = true;
$wgGroupPermissions['bot']['noanalytics'] = true;
// To exclude all logged in users give 'noanalytics' permission to 'user' group, i.e.
$wgGroupPermissions['user']['noanalytics'] = true;

참고

https://www.mediawiki.org/wiki/Extension:Google_Analytics_Integration

http://www.google.co.kr/intl/ko/analytics/