keystone-design-bootstrap 1.0.89 → 1.0.90
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -129,7 +129,10 @@ export function LoginForm({ onSuccess, onClose }: LoginFormProps) {
|
|
|
129
129
|
return false;
|
|
130
130
|
}
|
|
131
131
|
|
|
132
|
-
|
|
132
|
+
// Single Lead fire for the whole portal flow, deduped against the server CAPI Lead
|
|
133
|
+
// via the shared eventID. Identity is set first so the event carries advanced matching.
|
|
134
|
+
await setPixelUserData({ email: emailValue, phone: fullPhone });
|
|
135
|
+
firePixelEvent('Lead', undefined, result?.eventId);
|
|
133
136
|
captureEvent('portal_login_step_advanced', { from_step: 'signup', to_step: 'authenticated', reason: 'passwordless_auth_success' });
|
|
134
137
|
captureEvent('portal_login_completed', { flow: 'signup' });
|
|
135
138
|
setResendAvailableAt(null);
|
|
@@ -165,8 +168,10 @@ export function LoginForm({ onSuccess, onClose }: LoginFormProps) {
|
|
|
165
168
|
return;
|
|
166
169
|
}
|
|
167
170
|
|
|
171
|
+
// Store hashed identity for advanced matching, but do NOT fire a Lead here.
|
|
172
|
+
// The Lead fires once on completion (finishPasswordlessAuth) with a dedup eventID,
|
|
173
|
+
// so the phone step no longer double-counts conversions in Ads Manager.
|
|
168
174
|
await setPixelUserData({ phone: fullPhone });
|
|
169
|
-
firePixelEvent('Lead');
|
|
170
175
|
|
|
171
176
|
setResendAvailableAt(result.resend_available_at ? new Date(result.resend_available_at).getTime() : Date.now() + 5 * 60 * 1000);
|
|
172
177
|
setStep('verify');
|
|
@@ -242,7 +242,9 @@ async function handlePasswordlessAuth(request: Request, NR: NextResponseLike): P
|
|
|
242
242
|
const token = json.data?.token;
|
|
243
243
|
if (!token) return NR.json({ error: 'No token received.' }, { status: 500 });
|
|
244
244
|
|
|
245
|
-
|
|
245
|
+
// Surface the server-side Lead event_id so the browser can fire a single deduped
|
|
246
|
+
// Lead (fbq track with { eventID }) that Meta matches against the CAPI Lead event.
|
|
247
|
+
const response = NR.json({ eventId: json.data?.event_id ?? undefined });
|
|
246
248
|
response.cookies.set(CONSUMER_TOKEN_COOKIE, token, {
|
|
247
249
|
httpOnly: true,
|
|
248
250
|
secure: process.env.NODE_ENV === 'production',
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
declare module '@rails/actioncable' {
|
|
2
|
-
export interface Cable {
|
|
3
|
-
subscriptions: {
|
|
4
|
-
create(
|
|
5
|
-
channelName: string | { channel: string; [key: string]: unknown },
|
|
6
|
-
callbacks?: {
|
|
7
|
-
connected?(): void;
|
|
8
|
-
disconnected?(): void;
|
|
9
|
-
received?(data: unknown): void;
|
|
10
|
-
rejected?(): void;
|
|
11
|
-
}
|
|
12
|
-
): {
|
|
13
|
-
unsubscribe(): void;
|
|
14
|
-
};
|
|
15
|
-
};
|
|
16
|
-
disconnect(): void;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export function createConsumer(url?: string): Cable;
|
|
20
|
-
}
|