update refer links to other docs with utm_source#317
Conversation
ef8ff42 to
0bed921
Compare
Codecov Report
@@ Coverage Diff @@
## main #317 +/- ##
==========================================
- Coverage 86.29% 86.22% -0.08%
==========================================
Files 134 134
Lines 6312 6314 +2
==========================================
- Hits 5447 5444 -3
- Misses 865 870 +5
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
|
@Roshanjossey I don't think this is a sustainable way to add the query string parameter to clicked links. We can easily forget to add it on existing or new links. In order to give reliable information, is it possible to modify the website so that it adds |
|
@alaeddine-13, good point. I've made that change |
docs/_static/source-in-links.js
Outdated
| url.searchParams.set("utm_source", "docarray"); | ||
| return url.href | ||
| } | ||
| catch{} |
There was a problem hiding this comment.
Maybe just return href in the catch clause ?
There was a problem hiding this comment.
Catch block is executed only if there's an error in try block. If there are no errors, nothing will be returned from that function
There was a problem hiding this comment.
no the logic is, attempt to add utm source to link, otherwise if failed (catch block), keep it as it is (return href as it is)
Thanks, I just added small comments. Is it possible to apply this logic to other PRs that target other documentation websites if there are any ? Thanks |
…rce" This reverts commit 0bed921.
5f29b28 to
5554a05
Compare
|
@alaeddine-13, I'm made changes you suggested. I'll do the same with other docs. |
|
📝 Docs are deployed on https://ft-docs-add-source-query-to-links--jina-docs.netlify.app 🎉 |
Goals: