Add Track analytics-tracking alias for RegisterPlacement#2
Closed
claude[bot] wants to merge 1 commit into
Closed
Conversation
Add a public Track(string, Dictionary<string, object>) convenience method that delegates to RegisterPlacement without a paywall presentation handler or feature callback. Intended for fire-and-forget analytics event tracking; events are queryable via Superwall's Query API.
Author
|
Closing per the thread discussion — we're keeping a single |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by Jake Mor · Slack thread
Before
The only public way to send an event to Superwall from Unity is
Superwall.Instance.RegisterPlacement(placement, parameters, handler, feature). That API is paywall-oriented: it accepts an optionalPaywallPresentationHandlerand an optionalAction featurecallback. To simply send an analytics event, callers had to invokeRegisterPlacementand ignore the handler/callback parameters, which obscures the intent.After
A new public
Superwall.Instance.Track(placement, parameters)method provides a clear, fire-and-forget way to send arbitrary analytics events — no paywall handlers, no feature callbacks. These events are uncapped and queryable via Superwall's Query API, positioning Superwall as an agent-first alternative to Mixpanel/Amplitude/PostHog.How
Trackis a thin convenience alias. It simply delegates to the existingRegisterPlacementmethod, passing through only the placement name and optional parameters (Dictionary<string, object>) and omitting the handler and feature arguments:No new native bridge calls or behavior — all existing registration/tracking semantics are reused unchanged.
Naming
Trackwas chosen as the analytics alias, matching the verb used by Mixpanel/Amplitude/PostHog SDKs and following C#/Unity PascalCase conventions. Reviewers are welcome to suggest alternatives (e.g.TrackEvent).Notes
Runtime/Superwall.cs(12 insertions).Generated by Claude Code