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

Option to disable sending events and only log them #325

Open
1 of 4 tasks
TriPSs opened this issue Dec 11, 2024 · 3 comments
Open
1 of 4 tasks

Option to disable sending events and only log them #325

TriPSs opened this issue Dec 11, 2024 · 3 comments
Labels
enhancement New feature or request nodejs

Comments

@TriPSs
Copy link

TriPSs commented Dec 11, 2024

Is your feature request related to a problem?

During development it would be quite handy if we could disable the actual sending of events and only log what would have been send.

This will make implementing PostHog events easier and wont pollute the dashboard with test data.

Describe the solution you'd like

An option to prevent the sending of events and only log them.

Describe alternatives you've considered

Related sub-libraries

  • All of them
  • posthog-web
  • posthog-node
  • posthog-react-native

Additional context

Similar to #1320

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

@TriPSs TriPSs added the enhancement New feature or request label Dec 11, 2024
@rafaeelaudibert
Copy link
Member

Hey, @TriPSs!

This is supported already in the main library version, check https://posthog.com/docs/libraries/js#or-send-no-events-while-developing out. I suggest you use that library for more advanced use cases. It was actually added as a follow-up to a request of yours: PostHog/posthog-js#1320.

I'll keep this issue open because I see the benefit of eventually porting that feature to the lite version

@TriPSs
Copy link
Author

TriPSs commented Dec 11, 2024

Aah, I thought that lib was only for web and not for node/backend/server events?

@rafaeelaudibert
Copy link
Member

Ah, I apologize, you're interested in the node version, you made that clear in the description, but I skipped over it. In that case, you're correct, this should be implemented in here, and I'll keep this one open :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request nodejs
Projects
None yet
Development

No branches or pull requests

3 participants