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

Allow extending posthog.js via plugins #3504

Closed
macobo opened this issue Feb 26, 2021 · 4 comments
Closed

Allow extending posthog.js via plugins #3504

macobo opened this issue Feb 26, 2021 · 4 comments
Labels

Comments

@macobo
Copy link
Contributor

macobo commented Feb 26, 2021

Is your feature request related to a problem?

There are a lot of features which are useful from a "build a successful company" or product analytics standpoint, but which are niche enough to justify building into core posthog.

Some common ones are ones which interact with the users product in some ways

  • User surveys, feedback
  • Notifications (e.g. notifying users about updates, etc)
  • Opt out tools

It would be great if we could build them out via plugins.

Describe the solution you'd like

A special type of plugin which, which loads some javascript from a plugin.

So for a survey(monkey) plugin, when a user would visit a site with posthog:

  • /decide endpoint gets called
  • It returns some extra javascript to execute on the page which creates a survey
  • After survey is filled (or ignored) it sends events to posthog.

For posthog users they would need to:

  • Go to plugins
  • Configure and enable "survey" plugin
  • This would include define the criteria of people they're interested in (e.g. via naming a feature flag)
  • Later on analyze the results in posthog.

For plugin creators:

  • They would define a plugin, by defining the code that would get loaded into posthog.js
  • Optionally need to define a parameter which is the user filter criteria (e.g. a feature flag input)

Describe alternatives you've considered

Build it ourselves

Additional context

Idea from call with customer today. Curious on your thoughts @mariusandra @jamesefhawkins @Twixes @yakkomajuri

Thank you for your feature request – we love each and every one!

@mariusandra
Copy link
Collaborator

Interesting idea. An alternative to serving JS inside /decide (might make the request huge?) is to do it similar to session recordings --> later on we download the necessary JS from app.posthog.com/js/:team_id/plugins.js or something like that.

@macobo
Copy link
Contributor Author

macobo commented Apr 9, 2021

Another idea that came up - cloning https://announcekit.app/ :)

@posthog-bot
Copy link
Contributor

This issue hasn't seen activity in two years! If you want to keep it open, post a comment or remove the stale label – otherwise this will be closed in two weeks.

@posthog-bot
Copy link
Contributor

This issue was closed due to lack of activity. Feel free to reopen if it's still relevant.

@posthog-bot posthog-bot closed this as not planned Won't fix, can't repro, duplicate, stale Jan 1, 2024
@github-project-automation github-project-automation bot moved this to Done This Sprint in Extensibility Aug 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done This Sprint
Development

No branches or pull requests

3 participants