Skip to content

tracker.trackSignUp()

Fires a GA4 sign_up event. When conversionLabels.signUp is configured, also fires a matching Ads conversion.

tracker.trackSignUp(input?: BrowserSignUpInput): Promise<void>;
type BrowserSignUpInput = {
transactionId?: string;
method?: string;
userData?: UserData;
};
FieldRequiredNotes
transactionIdnoAuto-generated when missing; standard dual-send-disabled warning fires.
methodnoThe sign-up provider — 'email', 'google', 'github', etc. Maps to GA4’s method param.
userDatanoHashed per enhanced conversions when supplied. Pass email here so Ads enhanced-conversions matching has something to work with — sign-up is one of the highest-leverage moments to capture identity.

Promise<void>.

'use client';
import { tracker } from '@/lib/tracker.client';
import { useTracker } from '@trackbridge/sdk/next';
export function SignUpForm() {
return (
<form
onSubmit={async (e) => {
e.preventDefault();
const user = await api.signUp(/* ... */);
tracker.identifyUser(user.id);
await tracker.trackSignUp({
transactionId: user.id,
method: 'email',
userData: { email: user.email },
});
}}
>
{/* ... */}
</form>
);
}

Calling identifyUser(user.id) before trackSignUp ensures any subsequent GA4 events on this session attribute to the new user.