Skip to content

send newsletter to posthog#6581

Open
tgberkeley wants to merge 2 commits into
mainfrom
newsletter-update
Open

send newsletter to posthog#6581
tgberkeley wants to merge 2 commits into
mainfrom
newsletter-update

Conversation

@tgberkeley
Copy link
Copy Markdown
Contributor

All Submissions:

  • Have you followed the guidelines stated in CONTRIBUTING.md file?
  • Have you checked to ensure there aren't any other open Pull Requests for the desired changed?

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

New Feature Submission:

  • Does your submission pass the tests?
  • Have you linted your code locally prior to submission?

Changes To Core Features:

  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your core changes, as applicable?
  • Have you successfully ran tests with your changes locally?

After these steps, you're ready to open a pull request.

a. Give a descriptive title to your PR.

b. Describe your changes.

c. Put `closes #XXXX` in your comment to auto-close the issue that your PR fixes (if such).

@tgberkeley tgberkeley requested a review from a team as a code owner May 29, 2026 02:00
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented May 29, 2026

Greptile Summary

This PR wires PostHog newsletter-signup tracking into the existing signup flow by adding a track_newsletter_posthog_submission helper and yielding it from the signup background event handler.

  • New track_newsletter_posthog_submission function in posthog.py calls _track_form_posthog(\"newsletter_signup\", form_data, _COMMON_KEYS) — consistent with the existing demo_request and intro_submit wrappers.
  • signup.py yields the new tracker immediately after the existing webhook and Loops calls, passing the validated (or None) email to PostHog via rx.call_script.

Confidence Score: 4/5

Safe to merge; the change is additive and follows established patterns in the codebase.

The integration is straightforward and consistent with existing PostHog wrappers. The two flagged points — PostHog firing with a None email and the use of _COMMON_KEYS where only email is relevant — are minor and match pre-existing behavior in the same function.

Both changed files are small and low-risk; signup.py line 110 is worth a second look regarding the None-email path.

Important Files Changed

Filename Overview
packages/reflex-components-internal/src/reflex_components_internal/blocks/telemetry/posthog.py Adds track_newsletter_posthog_submission — a thin wrapper around _track_form_posthog that fires a newsletter_signup event; reuses _COMMON_KEYS even though only email is relevant for a newsletter signup.
packages/reflex-site-shared/src/reflex_site_shared/backend/signup.py Imports and yields track_newsletter_posthog_submission in the signup background event; the PostHog yield fires even when email is None, mirroring a pre-existing gap in the two adjacent calls.

Reviews (1): Last reviewed commit: "send newsletter to posthog" | Re-trigger Greptile

@codspeed-hq
Copy link
Copy Markdown

codspeed-hq Bot commented May 29, 2026

Merging this PR will not alter performance

✅ 24 untouched benchmarks


Comparing newsletter-update (171ce16) with main (3b70322)

Open in CodSpeed

Copy link
Copy Markdown
Contributor

@carlosabadia carlosabadia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

works for me

@carlosabadia carlosabadia added the skip-changelog For doc/internal changes label May 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip-changelog For doc/internal changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants