-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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: Update Svelte Onboarding Code #27155
base: master
Are you sure you want to change the base?
Conversation
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.
Hey, @nermalcat69! This is great! I agree this is a much better fix - and ChatGPT agrees with the both of us, I'm not the best at Svelte :)
There are two changes we might want here:
- Can you make sure you're importing
onMount
? My understanding is that it's not available by default, correct me if I'm wrong - Can you by any chance update our Svelte documentation on the website as well? It's fine if you can't get to it, I can always try and update it myself, but I believe you have more knowledge than I have :)
The docs are live here: https://posthog.com/docs/libraries/svelte
Our docs live in here, and it should be easy to find where to update it: https://github.com/PostHog/posthog.com
Sureee, Thanks @rafaeelaudibert i'll get back to you ASAP! |
Make sure you're enjoying the end-of-year break as well :). Thank you! |
Review it whenever you get time and thanks for your time 💯 Merry Belated Christmas 😄 |
The docs pr: PostHog/posthog.com#10223 |
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.
🎉
Problem
I was setting up posthog for my website saasplates.com which is written in svelte and i noticed this problem so thought i should fix it.
Changes
Added OnMount as it's the best one and works best when a user visits the site.
👉 Stay up-to-date with PostHog coding conventions for a smoother review.
Does this work well for both Cloud and self-hosted?
How did you test this code?