Data Layer implementation on Marketo forms | Community
Skip to main content
New Participant
February 4, 2022
Question

Data Layer implementation on Marketo forms

  • February 4, 2022
  • 1 reply
  • 1463 views

Hello,

 

we are trying to leverage the Data Layer that is being generated for the forms through Marketo. We want to collect the form ID, form name(in our case this is the Program name, captured via token in the form) and the event type.

 

I have this demo page https://info.softwareag.com/tracking-events.html and this JS that should control the implementation: https://info.softwareag.com/rs/858-DJP-749/images/tracking_events.js 

 

The problem is that on form.onSuccess(or form.onSubmit) the eventType stays as "formLoad". But in fact it should change to "formSubmit".

 

Do you have an idea how to fix this?

 

Kind regards,

Yavor

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

1 reply

New Participant
February 4, 2022

Hi Yavor, 

looks like you created an arrey of events but you ask for the eventTyp of 0 only. 

console.log(digitalData.events[0].eventInfo.eventType);

output "FormLoad"

 

console.log(digitalData.events[1].eventInfo.eventType);

output is "formSubmit"

did you check which data you receive?