mozilla / addon-recommendation-shield-study

Stand-alone verison of Add-on Recommendation for Shield Study
Mozilla Public License 2.0
3 stars 7 forks source link

stronger domain matching using sdk/url #86

Closed casebenton closed 8 years ago

casebenton commented 8 years ago

@Osmose or @mythmon r?

mythmon commented 8 years ago

I think I'd leave the urls in the data file without www., and instead of using === to check the domain, check that the current domain ends with the target domain. That way subdomains automatically work the way most people would expect, and you can still be more specific if you need to (addons.mozilla.org vs mozilla.org for example).

Osmose commented 8 years ago

Isn't that what caused #79 in the first place?

mythmon commented 8 years ago

Oh, good point. To do what I said you'd need to be a little more clever and look at the dots in the hostname. I'm not sure if that is worth it. What do you think @casebenton?

casebenton commented 8 years ago

I think that it could be useful in the future to have a robust system that includes subdomains, but for now the current technique in this PR is sufficient for the recommendations we are providing (seeing as most of the target domains don't really have prominent subdomains).

While this system isn't ideal compared to something that would handle subdomains well, do you think that it's alright if we use it for this study? In my testing it worked on all of the target domains.

mythmon commented 8 years ago

Yeah lets go with this. I proposed the subdomain idea because originally I thought it would be pretty easy.