Skip to content

fix(analytics): emit signup email and timestamp together (OSS-14856) - #1042

Merged
malhotra5 merged 1 commit into
mainfrom
fix/oss-14856-signup-identity-event
Oct 28, 2026
Merged

malhotra5 merged 1 commit into
mainfrom
fix/oss-14856-signup-identity-event

Conversation

@malhotra5

@malhotra5 malhotra5 commented Oct 27, 2026 •

Copy link
Copy Markdown
Member

HUMAN:

  • A human has tested these changes.

AGENT:

Why

The PostHog-to-HubSpot signup upsert currently subscribes to all $set events because the signup timestamp and email are emitted separately. An earlier attempt to filter by person properties at the destination suppressed all runs. The destination is now disabled while this change prepares an event-local signup payload.

Summary

  • Include the user's email (when present) with signed_up_at in the same consent-gated set_person_properties call at TOS acceptance.
  • Cover signup with and without an email using the real accept-TOS route and a PostgreSQL-backed user.

Issue Number

OSS-14856

How to Test

  • uv run pytest -q tests/unit/server/routes/test_auth_onboarding.py tests/unit/test_analytics_service.py tests/unit/server/routes/test_idp.py (240 passed locally).
  • After deployment, inspect a consented test signup in PostHog: one $set event should contain both $set.email and $set.signed_up_at. When the user has no email, only the signup timestamp should be sent.

Video/Screenshots

Not applicable: backend-only event payload change; covered by route and analytics tests.

Type

  • Bug fix
  • Feature
  • Refactor
  • Breaking change
  • Docs / chore

Notes

The production HubSpot upsert destination remains disabled. Do not re-enable it on merge: first validate the emitted event in production, configure and test an event-local signup filter, and verify a test contact reaches HubSpot without restoring high run volume. This PR does not change PostHog configuration.

This PR was created by an AI agent (OpenHands) on behalf of the user.


Enterprise server image for this PR:

ghcr.io/openhands/enterprise-server:sha-3aac0d5

Co-authored-by: openhands <openhands@all-hands.dev>
@github-actions github-actions Bot added the type: fix A bug fix label Oct 27, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Coverage report

Click to see where and how coverage changed

FileStatementsMissingCoverageCoverage
(new stmts)
Lines missing
  server/routes
  auth.py 1292-1293
Project Total  

This report was generated by python-coverage-comment-action

@malhotra5
malhotra5 marked this pull request as ready for review October 27, 2026 19:58
@malhotra5
malhotra5 requested review from a team and hieptl and removed request for a team October 27, 2026 19:58
@malhotra5
malhotra5 merged commit e1c4cba into main Oct 28, 2026
22 checks passed
@malhotra5
malhotra5 deleted the fix/oss-14856-signup-identity-event branch October 28, 2026 14:35
@openhands-release-bot openhands-release-bot Bot added the released: 1.81.0 Shipped in 1.81.0 label Oct 28, 2026
@openhands-release-bot

Copy link
Copy Markdown
Contributor

🚀 Released in 1.81.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

released: 1.81.0 Shipped in 1.81.0 type: fix A bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants