Search keywords are lost for referrers whose search engine domain starts the URL
Maintainer thường phản hồi trong vòng 1 ngày
Một pull request liên quan đã được merge.
- #8230 của @RaphaelFakhri — đã merge
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- javascript, node.js
Hướng nghiên cứu
Read plugins/sources/api/api.js and trace how urlParser checks engine names and stores search parameters; compare this with the /o/keywords check described in the issue. Reproduce with one of the listed _store referrers and confirm its stored source retains the expected keyword parameter. A pull request is already open for this issue.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
For web apps, the sources plugin stores each referrer through urlParser in plugins/sources/api/api.js. For a search engine referrer, it keeps only the search query parameter. Engine-specific parameters (wd for Baidu, p for Yahoo, text for Yandex, u for facebook.com/l.php) are kept only if the referrer path contains the engine name, checked with path.indexOf(engine) > 0.
urlParser removes the protocol and www. before this check, so for many referrers the engine name is at index 0. The check fails and the parameter is dropped. The Search keywords view (/o/keywords) then has no keyword to show for these visits. /o/keywords checks the same thing with indexOf(...) !== -1, so the two checks disagree.
Steps to reproduce
Send a session for a web app with one of these _store values:
| Referrer | Stored source | Expected |
|---|---|---|
https://www.baidu.com/s?ie=utf-8&wd=countly |
baidu.com/s |
baidu.com/s?wd=countly |
https://yandex.ru/search/?lr=213&text=countly |
yandex.ru/search/ |
yandex.ru/search/?text=countly |
https://yahoo.com/search?fr=yfp&p=countly |
yahoo.com/search |
yahoo.com/search?p=countly |
https://www.facebook.com/l.php?u=https%3A%2F%2Fcount.ly |
facebook.com/l.php |
facebook.com/l.php?u=https%3A%2F%2Fcount.ly |
Referrers where the engine is a subdomain, such as https://search.yahoo.com/search?p=countly, are not affected.
Expected behavior
The keyword is kept, and it appears under Search keywords.
- Ngôn ngữ chính
- JavaScript
- Star
- 5.9k
- Fork
- 985
- Merge trung bình
- 1 ngày 15 phút
- Pull request đã merge (30 ngày)
- 116
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 2 ngày
-
desktop v3 windows
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
esengine/DeepSeek-Reasonix#15016 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Fei2411/DeepSeek-Bot#1113 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
arfct/timezone.fyi#19 ·