Bearloga has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/382320 )
Change subject: pageviews that are search results pages
......................................................................
pageviews that are search results pages
In T176464#3636190, @Jdlrobson mentioned that on some browsers, when you
clicked on the search icon, it will take you to a blank Special:Search page and
let you start from there. Therefore, we should exclude these blank SRP from our
counts.
Change-Id: If4aef7521a3268da85e7a3498cce1b33a2ee43a4
---
M modules/metrics/search/search_result_pages
M modules/metrics/search/sister_search_traffic
2 files changed, 4 insertions(+), 16 deletions(-)
Approvals:
Bearloga: Verified; Looks good to me, approved
diff --git a/modules/metrics/search/search_result_pages
b/modules/metrics/search/search_result_pages
index 348de5f..e009447 100755
--- a/modules/metrics/search/search_result_pages
+++ b/modules/metrics/search/search_result_pages
@@ -25,14 +25,8 @@
-- pageviews that are search results pages
AND page_id IS NULL
AND (
- uri_path = '/wiki/Special:Search'
- OR (
- uri_path = '/w/index.php'
- AND (
- LENGTH(PARSE_URL(CONCAT('http://', uri_host, uri_path, uri_query),
'QUERY', 'search')) > 0
- OR LENGTH(PARSE_URL(CONCAT('http://', uri_host, uri_path,
uri_query), 'QUERY', 'searchToken')) > 0
- )
- )
+ LENGTH(PARSE_URL(CONCAT('http://', uri_host, uri_path, uri_query),
'QUERY', 'search')) > 0
+ OR LENGTH(PARSE_URL(CONCAT('http://', uri_host, uri_path, uri_query),
'QUERY', 'searchToken')) > 0
)
) AS serp
GROUP BY date, access_method, agent_type;
diff --git a/modules/metrics/search/sister_search_traffic
b/modules/metrics/search/sister_search_traffic
index 0e5b7c6..15097b4 100755
--- a/modules/metrics/search/sister_search_traffic
+++ b/modules/metrics/search/sister_search_traffic
@@ -22,14 +22,8 @@
(
page_id IS NULL
AND (
- uri_path = '/wiki/Special:Search'
- OR (
- uri_path = '/w/index.php'
- AND (
- PARSE_URL(CONCAT('http://', uri_host, uri_path, uri_query),
'QUERY', 'search') IS NOT NULL
- OR PARSE_URL(CONCAT('http://', uri_host, uri_path, uri_query),
'QUERY', 'searchToken') IS NOT NULL
- )
- )
+ LENGTH(PARSE_URL(CONCAT('http://', uri_host, uri_path, uri_query),
'QUERY', 'search')) > 0
+ OR LENGTH(PARSE_URL(CONCAT('http://', uri_host, uri_path, uri_query),
'QUERY', 'searchToken')) > 0
)
) AS is_serp
FROM webrequest
--
To view, visit https://gerrit.wikimedia.org/r/382320
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: If4aef7521a3268da85e7a3498cce1b33a2ee43a4
Gerrit-PatchSet: 2
Gerrit-Project: wikimedia/discovery/golden
Gerrit-Branch: master
Gerrit-Owner: Chelsyx <[email protected]>
Gerrit-Reviewer: Bearloga <[email protected]>
Gerrit-Reviewer: Chelsyx <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits