-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Closes #10300: Fix Baidu search telemetry #19127
Conversation
b5bcde9
to
d6be804
Compare
d6be804
to
22e25d1
Compare
Since the problem of Baidu that the codes start with figures, I add prefix to these codes with "_" |
22e25d1
to
91fbb4c
Compare
Codecov Report
@@ Coverage Diff @@
## master #19127 +/- ##
============================================
- Coverage 35.79% 35.78% -0.02%
Complexity 1649 1649
============================================
Files 545 545
Lines 21896 21905 +9
Branches 3263 3267 +4
============================================
Hits 7838 7838
- Misses 13151 13161 +10
+ Partials 907 906 -1
Continue to review full report at Codecov.
|
@@ -22,6 +22,21 @@ internal fun getTrackKey( | |||
|
|||
if (provider.codeParam.isNotEmpty()) { | |||
code = uri.getQueryParameter(provider.codeParam) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can imagine us assigning this to a codeParam
variable. I wonder how far that could get us without introducing the originalCode
, but continuing to modify code
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't quite get. Do you mean adding the "_" after the codeParam
, or adding other parameters in SearchProviderModel
apposed with codeParam
?
91fbb4c
to
95aee9e
Compare
Since there might be two types of urls from Baidu (https://m.baidu.com/s?from=... or https://m.baidu.com/from=*/s?), this patch handles baidu separately in Utils.kt
However, there is still a problem that the codes from Baidu are started with numbers (e.g. 844b/1000969a/...), which would be regarded as invalid characters by Glean.
Need more discussion about this, so leave it a draft.