-
Notifications
You must be signed in to change notification settings - Fork 17
fix: limit the number of high organic low ctr opportunities to top 3 #1863
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
|
This PR will trigger a patch release when merged. |
ramboz
left a comment
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.
Code looks good to me.
I'm not sure about the UX. My understanding from the code is that if we have an existing set of 3 opptys on Friday, and the practitioner sees them, then on Monday we could potentially have 3 new ones that replace them. It doesn't meant the initial 3 are fixed, just that they are not the most important ones anymore. Correct?
Feels a bit like we could end up with opptys popping up and disappearing every other week (or so) in an extreme case. Not sure if this is the desired UX :)
Yes, this is the current behavior, with out this change as well.
Yes, this is intended. We should always show the latest opportunities with latest data. If a page is no longer relevant, we should delete that and show what's important from the latest run. |
Problem
We send up to 10 URLs to Mystique for generating high-organic-low-ctr opportunities. While some pages get dropped (if headline/CTA can't be found), we may still end up with up to 10 opportunities, which can look spammy.
Solution
Limit the maximum number of high-organic-low-ctr opportunities to 3 per site using an eviction strategy based on pageViews:
Known limitation
Since Mystique sends suggestions asynchronously and SQS may process multiple messages concurrently, there's a potential race condition where more than 3 opportunities could be created before the capacity check takes effect. However, this scenario has very low chances.