Skip to content

Add Superwall.track analytics alias for register#420

Closed
claude[bot] wants to merge 1 commit into
developfrom
track-placement-alias
Closed

Add Superwall.track analytics alias for register#420
claude[bot] wants to merge 1 commit into
developfrom
track-placement-alias

Conversation

@claude

@claude claude Bot commented Jun 27, 2026

Copy link
Copy Markdown

Requested by Jake Mor · Slack thread

Changes in this pull request

  • Adds a new public extension Superwall.track(event: String, params: Map<String, Any>? = null) next to the existing register extension in PublicPresentation.kt.

Before: To send an analytics event you had to call register(placement = ..., params = ...), which is paywall-oriented and exposes a handler and a feature closure even when you only want fire-and-forget event tracking.

After: You can call Superwall.track("my_event", params) for uncapped, fire-and-forget analytics events. No paywall presentation handling and no feature gating — the event is simply sent to Superwall and is queryable via the Query API. This positions Superwall as an agent-first alternative to Mixpanel/Amplitude/PostHog.

How: track is a thin alias that delegates directly to register(placement = event, params = params) with handler = null and no feature closure. No registration logic is duplicated.

Naming note: track was chosen as the analytics alias to match common analytics-SDK conventions. Reviewers should weigh in if they'd prefer trackEvent or registerEvent.

Checklist

  • All unit tests pass.
  • All UI tests pass.
  • Demo project builds and runs.
  • I added/updated tests or detailed why my change isn't tested.
  • I added an entry to the CHANGELOG.md for any breaking changes, enhancements, or bug fixes.
  • I have run ktlint in the main directory and fixed any issues.
  • I have updated the SDK documentation as well as the online docs.
  • I have reviewed the contributing guide

Generated by Claude Code

Adds a thin fire-and-forget public extension Superwall.track(event, params)
that delegates to register(placement = event, params = params) with no
handler or feature closure, for sending arbitrary analytics events that are
queryable via the Query API.
@claude

claude Bot commented Jun 28, 2026

Copy link
Copy Markdown
Author

Closing per the thread discussion — we're keeping a single register method rather than re-introducing a track alias (it was removed previously for the same overlap). The analytics positioning will be handled in the docs around register instead. Thanks!

@claude claude Bot closed this Jun 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant