Skip to content

Instantly share code, notes, and snippets.

@nikosantis
Last active May 6, 2022 21:10
Show Gist options
  • Save nikosantis/995ec821a1aaf7a4d6230c6edcdef9f9 to your computer and use it in GitHub Desktop.
Save nikosantis/995ec821a1aaf7a4d6230c6edcdef9f9 to your computer and use it in GitHub Desktop.
Events for HD Forms
// with dataLayer object
// use this array push when the submitted form was success
dataLayer.push({
event: "formSent",
formName: "formName", // you can use formName or formId
formEmail: "email from form",
formPhone: "phone from form", // only if the phone is required in the form
formProductName: "product name" // only if have a selected product
});
// if you want to deliver more info, please,
// use in camelCase format with the initial word "form" ex: formDealer, formId, formExtraData
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment