Repository navigation
@agent-native/core@0.172.8
Patch Changes
-
e248449: Emit the
signupevent once per real account creation, and stop emitting it for user rows that are not signups.Better Auth runs its
user.create.afterhook on everyuserrow insert, and the hook treated all of them as a person signing up. Two production paths create rows throughinternalAdapteroutside any endpoint, where Better Auth's context — and therefore the request, the browser, and itsan_aid/an_ftcookies — isnull:ensureCanonicalUserForLegacySession(backfilling a canonical row for someone who signed up months ago) andensureGoogleAuthIdentity(provisioning the canonical row during the Google callback). Both emitted an unattributablesignuprecorded asreferral_source: "direct", which is why ~94% ofbetter-authsignups carried noanonymous_idand one person provisioned across sibling apps counted as a dozen acquisitions.Google sign-in was also losing its real event: because
ensureGoogleAuthIdentitywrites the canonical row beforecreateOAuthSessionruns, thehasBetterAuthUserEmailprobe there concluded the person was an existing user and skipped the one emitter that carries the browser's anonymous id. Callers now pass theisNewUseranswer they already hold, and the event carries the canonical Better Auth user id rather than the Google profile id, so it still joins toreferrer_userin the virality panels.- A row insert with no request behind it emits nothing at all.
- Emitted events carry
signup_origin(browser_signup/google_oauth/sso_jit) so acquisitions are selectable from sibling-app provisioning. referral_source: "direct"is no longer fabricated when no browser context was present — "we never saw a visitor" and "a visitor arrived with no campaign" are now different values.- The internal
x-agent-native-signup-attributionhandoff header is stripped from every inbound request instead of only being overwritten on email signup. It is unsigned and outranks the request cookie, so an inbound copy let any client write theanonymous_idand campaign onto someone else's signup row. - The
webhooktracking provider now sendsanonymousId, which it silently dropped.
Signup counts will fall to the real number. The removed rows were duplicate and backfilled events, not lost users.