Skip to content
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

Toolbar Launch does not work if target page changes url hash params #11831

Closed
2 tasks done
hazzadous opened this issue Sep 15, 2022 · 2 comments
Closed
2 tasks done

Toolbar Launch does not work if target page changes url hash params #11831

hazzadous opened this issue Sep 15, 2022 · 2 comments
Labels
bug Something isn't working right feature/toolbar Feature Tag: Toolbar

Comments

@hazzadous
Copy link
Contributor

Bug description

Many websites will perform an HTTP redirect or Js side location update when hitting e.g. the root page. To handle the enabling of the toolbar, we are passing a url hash, via a redirect from app.posthog.com, which we then look for in the posthog-js init code. If there is a redirect before this init code has a chance to run, then we do not see the toolbar launch.

This could be handled on the website side, ensuring that the init code is run before redirect, or the hash is maintained across redirect but this would complicate the app side and ideally we shouldn't expect people to have to change their app to use the toolbar.

How to reproduce

  1. setup or use a page that redirects/changes the url before posthog-js init method runs
  2. use this page as the launch url
  3. Click launch in the app.posthog.com ui

Environment

  • PostHog Cloud
  • self-hosted PostHog, version/commit: please provide
@hazzadous hazzadous added the bug Something isn't working right label Sep 15, 2022
@pauldambra
Copy link
Member

It may be related to #9100

At the least, we should document that the toolbar launch needs PosthogJS and the URL hash to load.

Relaxing that requirement might be possible but is tricky too...

@hazzadous
Copy link
Contributor Author

It may be related to #9100

Yes possibly, feel free to close as a duplicate

@EDsCODE EDsCODE added the feature/toolbar Feature Tag: Toolbar label Oct 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working right feature/toolbar Feature Tag: Toolbar
Projects
None yet
Development

No branches or pull requests

4 participants