워드프레스 WP Statistics는 가장 많이 사용하는 통계프로그램인데요. 기본으로 네이버, 다음 등 국산 검색엔진이 빠져 있는데 이를 추가하는 방법입니다.

WP Statistics에 네이버, 다음 검색 유입 경로 추가 방법
모양 > 테마 파일 편집기 > functions.php 맨 밑에 다음 소스를 넣은후 저장하면 됩니다.
add_filter('wp_statistics_search_engine_list', function ($engines) {
$engines['naver'] = [
'name' => 'Naver',
'translated' => __('Naver', 'wp_statistics'),
'tag' => 'naver',
'sqlpattern' => '%naver.com%',
'regexpattern' => 'naver.com',
'querykey' => 'query',
'image' => 'naver.png',
'logo_url' => 'naver.png'
];
$engines['daum'] = [
'name' => 'Daum',
'translated' => __('Daum', 'wp_statistics'),
'tag' => 'daum',
'sqlpattern' => '%daum.net%',
'regexpattern' => 'daum\.net',
'querykey' => 'q',
'image' => 'daum.png',
'logo_url' => 'daum.png'
];
return $engines;
});

적용후 statistics setting 화면에서 맨아래 보면 네이버와 다음 검색엔진이 추가 된것을 확인 할수 있으며 이제부터 naver, daum 검색유입이 카운트 됩니다.
