Skip to content

Commit dd52492

Browse files
authored
Merge pull request #13564 from guardian/tf-auxia-track
Track when auxia treatment is returned
2 parents 89bdc8b + 5475fee commit dd52492

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

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

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -706,6 +706,25 @@ const SignInGateSelectorAuxia = ({
706706
);
707707
if (data !== undefined) {
708708
setAuxiaGateDisplayData(data);
709+
710+
const treatmentId =
711+
data.auxiaData.userTreatment?.treatmentId;
712+
if (treatmentId) {
713+
// 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(
715+
{
716+
component: {
717+
componentType: 'SIGN_IN_GATE',
718+
id: treatmentId,
719+
},
720+
action: 'RETURN',
721+
abTest: buildAbTestTrackingAuxiaVariant(
722+
treatmentId,
723+
),
724+
},
725+
renderingTarget,
726+
);
727+
}
709728
}
710729
}
711730
})().catch((error) => {

0 commit comments

Comments
 (0)