Skip to content

Add Track analytics-tracking alias for RegisterPlacement#2

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

Add Track analytics-tracking alias for RegisterPlacement#2
claude[bot] wants to merge 1 commit into
mainfrom
track-placement-alias

Conversation

@claude

@claude claude Bot commented Jun 27, 2026

Copy link
Copy Markdown

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 optional PaywallPresentationHandler and an optional Action feature callback. To simply send an analytics event, callers had to invoke RegisterPlacement and 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

Track is a thin convenience alias. It simply delegates to the existing RegisterPlacement method, passing through only the placement name and optional parameters (Dictionary<string, object>) and omitting the handler and feature arguments:

public void Track(string placement, Dictionary<string, object> parameters = null)
{
    RegisterPlacement(placement, parameters);
}

No new native bridge calls or behavior — all existing registration/tracking semantics are reused unchanged.

Naming

Track was 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

  • Single-file change in Runtime/Superwall.cs (12 insertions).
  • A full Unity compile was not available in this environment; the change was reviewed for syntactic consistency against the surrounding code only.

Generated by Claude Code

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.
@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