Search keywords are lost for referrers whose search engine domain starts the URL
メンテナーはふだん 1 日以内に返信
関連するプルリクエストがすでにマージされています。
- #8230 @RaphaelFakhri による — マージ済み
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 35/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 停滞
- 技術スタック
- javascript, node.js
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
説明
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.
- 主要言語
- JavaScript
- スター
- 5.9k
- フォーク
- 985
- 平均マージ
- 1日 15分
- マージ済み PR(30日)
- 116
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
似ている issue
-
bug needs-triage potential-regression
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
aws/aws-sdk-js-v3#8408 ·
メンテナーはふだん 1 日以内に返信
-
[v3] KeyBindingManager calls (Add/Remove) are not converted into a case-insensitive accelerator.KeyオープンBug
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 4 日以内に返信
-
fix(docs): align git__gh troubleshooting with its actual failure paths対応中かも @akhil9tiet が今日担当しました。 オープンbug docs p2
難易度 1/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100