PostHog / posthog.com

Official docs, website, and handbook for PostHog.
https://posthog.com
Other
407 stars 414 forks source link

Tutorial - Svelte analytics set up #5544

Closed ivanagas closed 1 year ago

ivanagas commented 1 year ago

Strapline

Explain the idea in a sentence or two

Like the other library analytics setups, do one for Svelte where we create a basic app

Why should we do it?

How it will it be useful or interesting for readers/viewers

We don’t have any content for Svelte and two users have asked for it recently, similar tutorials perform well

Headlines options

think of two of three possible headlines we could use

How to set up Svelte analytics, session recordings, feature flags, and more.

Outline

Bullet point outline of structure / questions / topics to be covered

fev4 commented 1 year ago

The only thing I would recommend showcasing here, is how to encapsulate the .capture function and generalize it so that it can be reused across the whole SvelteKit app. I don't use autocapture, as I would like total control on what events to send. No problem with showcasing the autocapture though.

In addition, while testing, here are several things I found:

Regarding NextAuth, here are some useful links:

That's about it for now.