Skip to content

Commit 7c6e258

Browse files
committed
Do not await auxia tracking events
1 parent 740b8ef commit 7c6e258

File tree

1 file changed

+20
-21
lines changed

1 file changed

+20
-21
lines changed

dotcom-rendering/src/components/SignInGateSelector.importable.tsx

Lines changed: 20 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -711,7 +711,7 @@ const SignInGateSelectorAuxia = ({
711711
data.auxiaData.userTreatment?.treatmentId;
712712
if (treatmentId) {
713713
// Record the fact that Auxia has returned a treatment. This is not a VIEW event, so we use the RETURN action here
714-
await submitComponentEventTracking(
714+
void submitComponentEventTracking(
715715
{
716716
component: {
717717
componentType: 'SIGN_IN_GATE',
@@ -811,28 +811,27 @@ const ShowSignInGateAuxia = ({
811811
const personaliseSignInGateAfterCheckoutSwitch = undefined;
812812

813813
useOnce(() => {
814-
void (async () => {
815-
await auxiaLogTreatmentInteraction(
816-
contributionsServiceUrl,
817-
userTreatment,
818-
'VIEWED',
819-
'',
820-
browserId,
821-
);
822-
await submitComponentEventTracking(
823-
{
824-
component: {
825-
componentType: 'SIGN_IN_GATE',
826-
id: treatmentId,
827-
},
828-
action: 'VIEW',
829-
abTest: buildAbTestTrackingAuxiaVariant(treatmentId),
830-
},
831-
renderingTarget,
832-
);
833-
})().catch((error) => {
814+
void auxiaLogTreatmentInteraction(
815+
contributionsServiceUrl,
816+
userTreatment,
817+
'VIEWED',
818+
'',
819+
browserId,
820+
).catch((error) => {
834821
console.error('Failed to log treatment interaction:', error);
835822
});
823+
824+
void submitComponentEventTracking(
825+
{
826+
component: {
827+
componentType: 'SIGN_IN_GATE',
828+
id: treatmentId,
829+
},
830+
action: 'VIEW',
831+
abTest: buildAbTestTrackingAuxiaVariant(treatmentId),
832+
},
833+
renderingTarget,
834+
);
836835
}, [componentId]);
837836

838837
return (

0 commit comments

Comments
 (0)