Any way to pass program/form name in hidden field or in form attribute?

Damon_Tribble2
Level 1

Any way to pass program/form name in hidden field or in form attribute?

I have set up Google Analytics to fire an event every time a Marketo form is viewed or submitted on our site. Right now, the event passes the four digit form ID in the event label. I would like to be able to pass the program name the form is associated with so it will be easier to tell what program the form is associated with when viewing the data in GA. 

 

Is there any way to pass the program name associated with the form in a hidden field or other form attribute which I could then include in my GA event? Thanks in advance for any help you can offer.

Damon

3 REPLIES 3
SanfordWhiteman
Level 10 - Community Moderator

Re: Any way to pass program/form name in hidden field or in form attribute?

Is this an embedded form, or a named form on a Marketo-hosted LP?

Damon_Tribble2
Level 1

Re: Any way to pass program/form name in hidden field or in form attribute?

It's an embedded form...

SanfordWhiteman
Level 10 - Community Moderator

Re: Any way to pass program/form name in hidden field or in form attribute?

Unfortunately, on a non-Marketo page, getting the {{Program.Name}} attribute — though it is present in the form descriptor — is a pretty tall order. You have to customize the way you load the form using JS (similar to my blog post about "speeding Marketo form loads," if you search for it).