AnsweredAssumed Answered

Blind form submit for Known Visitors on non-Marketo LP

Question asked by Thomas Terry on Jun 20, 2019
Latest reply on Jun 21, 2019 by Sanford Whiteman

Background, we would like to submit a blind form containing JSON when someone uses a tool on our corporate website. We have the following scenario:

1. Need to deploy via Google Tag Manager

2. Do not have access to email address via JS

3. Tool requires registration and that associates a cookie in MKTO record

 

Can we leverage Known Visitor HTML via a hidden form and add another hidden field to capture the JSON payload? And only trigger form submit on successful submission of the tool?

 

Here is really rough code for the Known Visitor HTML...

Am I way off base?

{{form.Button:default=Auto-submit}}  
<script> 
MktoForms2.whenReady(function(form){ 
var formEl = form.getFormElem()[0],
formEl.addHiddenFields({
     "jsonPayload":"{
    "glossary": {
        "title": "example glossary",
          "GlossDiv": {
            "title": "S",
               "GlossList": {
                "GlossEntry": {
                    "ID": "SGML",
                         "SortAs": "SGML",
                         "GlossTerm": "Standard Generalized Markup Language",
                         "Acronym": "SGML",
                         "Abbrev": "ISO 8879:1986",
                         "GlossDef": {
                        "para": "A meta-markup language, used to create markup languages such as DocBook.",
                              "GlossSeeAlso": ["GML", "XML"]
                    },
                         "GlossSee": "markup"
                }
            }
        }
    }
}",
     }); 
submitEl = formEl.querySelector(".mktoButton"); 
 
submitEl.click(); 
}); 
</script>

Outcomes