Merged in fix/SW-3115-form-tracking-changes (pull request #2470)
fix(SW-3115): add form complete tracking and removed input error tracking * fix(SW-3115): add form complete tracking and removed input error tracking Approved-by: Bianca Widstam
This commit is contained in:
committed by
Bianca Widstam
parent
86bd3fcea3
commit
d272cd03ce
@@ -79,3 +79,25 @@ export function trackFormValidationError(
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
export function trackFormCompletion(type: FormType, nameSuffix?: string) {
|
||||
if (type === "checkout") {
|
||||
trackEvent({
|
||||
event: "formCompletion",
|
||||
form: {
|
||||
action: "checkout form completion",
|
||||
name: "checkout enter detail" + nameSuffix,
|
||||
type: type,
|
||||
},
|
||||
})
|
||||
} else if (type === "signup") {
|
||||
trackEvent({
|
||||
event: "formCompletion",
|
||||
form: {
|
||||
action: "signup form completion",
|
||||
name: "member registration" + nameSuffix,
|
||||
type: type,
|
||||
},
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user