After logging in, PostHog will walk you through adding a small JavaScript snippet to your website. Copy the snippet it provides and paste it into the <head> section of your website's HTML. If you use a platform like WordPress, Webflow, or Squarespace, paste it in the 'custom code' or 'header scripts' section of your site settings. Once added, visit your website and then return to PostHog — you should see your first event appear within a minute.
$ <!-- Paste the snippet PostHog shows you during onboarding into your site's <head> tag. It looks like this: -->
$ <!-- !-- BEGIN POSTHOG -->
$ <script>
$ !function(t,e){...}(window, document)
$ </script>
$ <!-- END POSTHOG -->
What you should see
In the PostHog dashboard under 'Live Events', you will see events appearing as you browse your website.
This might happen
No events appear after adding the snippet
Check that the snippet is inside the <head> tag and that your browser is not blocking scripts with an ad blocker. Try opening your site in a private/incognito window.