-
Notifications
You must be signed in to change notification settings - Fork 129
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
fix: Cross-subdomain tracking is not working for long TLDs #787
Conversation
This PR hasn't seen activity in a week! Should it be merged, closed, or further worked on? If you want to keep it open, post a comment or remove the |
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 think this looks good. Sorry for the delay on the review
This PR hasn't seen activity in a week! Should it be merged, closed, or further worked on? If you want to keep it open, post a comment or remove the |
This PR was closed due to lack of activity. Feel free to reopen if it's still relevant. |
@benjackwhite @mariusandra When will this be merged? We're using PostHog and need this to track our users. |
|
Changes
Fixes #786.
Changed
DOMAIN_MATCH_REGEX
variable from[a-z0-9][a-z0-9-]+\.[a-z.]{2,6}$
to[a-z0-9][a-z0-9-]+\.[a-z]{2,}$
.It accepts any domain with a TLD length of at least 2 characters, and extracts the domain name only.
(I'm not sure why there were a
.
in the final section of previous regex, as it also fails on cases such asme.you.co
as well, where whole string matches with the previous pattern. The new pattern should work fine and extract the domain name.)...
Checklist