Skip to content

docs(integrations): correct emitted event names across integration pages - #255

Open
Makisuo wants to merge 1 commit into
mainfrom
docs/integration-event-name-accuracy
Open

docs(integrations): correct emitted event names across integration pages#255
Makisuo wants to merge 1 commit into
mainfrom
docs/integration-event-name-accuracy

Conversation

@Makisuo

@Makisuo Makisuo commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Summary

The Mixpanel page was recently corrected because it promised sw_-prefixed event names (sw_trial_start) while the shipped code emits Title Case (Trial Start). The same defect affected other pages.

I audited every integration in apps/integration-router/src/integrations/ against mapEventType. No emitted event names were changed — renaming would break existing customers' dashboards. Only the docs move.

The root cause: mapEventType returns both eventType (sw_*) and eventTypePretty (Title Case). Integrations that pass eventTypePretty as the default to the name resolver emit Title Case; those that pass eventType emit sw_*. The docs were written as if every integration did the latter.

What each integration actually emits

Integration Emitted
mixpanel, amplitude, statsig, appsflyer Title Case (amplitude prefixes [Superwall] )
firebase (non-revenue) eventTypePretty lowercased with whitespace → _
posthog, customerio sw_*
meta Subscribe/StartTrial/Purchase, else sw_* verbatim
discord, slack emoji titles (🤩 Trial Start)
singular sng_* / snake_case
onesignal, mixpanelEngage, adjust, appstance, metaAppEvents n/a — tags, profile updates, or own mapping

Corrected — documented names that were never emitted

  • statsig — claimed sw_* throughout. statsig-integration.spec.ts:81 already asserts Subscription Start. Rewrote all four tables with Statsig Event + Identifier columns and a Matching Order section.
  • amplitude — stale in a different way: documented Trial Conversion, Subscription Renewal, Trial Cancellation, [Superwall] Test. Really Trial Converted, Renewal, Trial Cancelled, Test Event. Also fixed revenueType (drops the [Superwall] prefix) and the insert_id format.
  • firebase — same stale wording family. Documented the real derivation, including that only whitespace is replaced — so Non-Renewing Purchase emits as non-renewing_purchase, hyphen intact.

Verified accurate, then filled in gaps

  • customer-io, meta-conversion-api — the sw_* claims are genuine. Added identifier framing, missing rows, Matching Order. Meta's action_source was documented as "app"; the code sends "system_generated".
  • discord — titles were right, but the table was incomplete and the colors were wrong: the trial-period check in getDiscordEmbedColor runs before the negative check, so a cancelled/refunded/expired trial is Blue, not Red, and a free intro start is Green, not Blue.
  • posthog — already correct, untouched.

eventNameMappings removed

All eventNameMappings documentation is gone: settings rows, config examples, Discord's "Custom Event Names" section and the related troubleshooting entries. Event names are fixed per integration — there is no per-customer renaming — so those sections described a capability that isn't offered.

Companion PR

Internal integration-router docs and the stale statsig fixture: superwall/paywall-next docs/integration-event-name-accuracy.

🤖 Generated with Claude Code

The Mixpanel page was recently corrected because it promised sw_-prefixed
event names while the shipped code emits Title Case. The same defect affected
other pages. Audited every integration in the integration-router against
mapEventType; no emitted names were changed, only the docs.

Corrected — the documented names were never emitted:

- statsig: claimed sw_* throughout; really emits Title Case. Rewrote all four
  tables with Statsig Event + Identifier columns and a Matching Order section.
- amplitude: documented Trial Conversion, Subscription Renewal, Trial
  Cancellation and [Superwall] Test — really Trial Converted, Renewal, Trial
  Cancelled, Test Event. Also fixed revenueType, which drops the [Superwall]
  prefix, and the insert_id format.
- firebase: same stale wording family (trial_conversion, subscription_renewal,
  *_cancellation). Documented the real derivation, including that only
  whitespace is replaced, so Non-Renewing Purchase emits non-renewing_purchase.

Verified accurate, then filled in gaps:

- customer-io and meta-conversion-api genuinely receive sw_* names. Added the
  identifier framing, the missing rows, and a Matching Order section. Meta's
  action_source was documented as "app"; the code sends "system_generated".
- discord titles were right but the table was incomplete and the colors were
  wrong: the trial-period check runs before the negative check, so a cancelled,
  refunded or expired trial is Blue rather than Red, and a free intro start is
  Green rather than Blue.

Also removed all eventNameMappings documentation. Event names are fixed per
integration — there is no per-customer renaming — so the settings rows, config
examples, Discord's "Custom Event Names" section and the related troubleshooting
entries described a capability that is not offered.

posthog was already correct and is untouched.

Internal integration-router docs and the stale statsig fixture are corrected in
the matching superwall/paywall-next PR.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
superwall-docs 9bcd4f0 Commit Preview URL

Branch Preview URL
Aug 06 2026, 11:58 AM

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