3 Replies Latest reply on Sep 6, 2018 8:24 PM by Sanford Whiteman

    Google reCAPTCHA - Marketo Form

    Sule Arifagaoglu

      Hello,

      Here is the steps I have taken;

      • I went to https://www.google.com/recaptcha/admin  and add my domain and subdomains which generated side key and secret key.
      • I have created 3 fields which are  LastReCAPTCHAUserResponse (string), LastReCAPTCHAServerStatus (boolean), LastReCAPTCHAServerSuccess (datetime) - Thanks Sanford Whiteman
      • I have created my Webhook in Marketo

      Webhook.png

       

      • After I saved, I have crated responsive Mapping. success to lastReCAPTCHAServerStatus.
      • I have crated SC, here is the Smart list and Flow screenshots

      Call Webhook - Smart List.png

      Call Webhook - Flow.png

       

      Request a Campaign - Smart List.png 

      Request a Campaign  - Flow.png

       

      • I have created Test Sule Landing page Template and added following snippet before the closing  </head> tag on my template:
        • <script ></script>
      • Also passed following snippet at the end of the <form >
        • <div class="g-recaptcha" data-sitekey=“MY_SIDE-KEY-WENT-HERE"></div>
      • Here is my Landing page that I have ReCAPTCHA:

       

      Here is my Questions:

      1. Why doesn’t  “I’m not a robot” box show up before Submit button?
      2. Currently, I can submit a form without checking that box, what am I missing?
      3. I have a feeling that I should use following JS code somewhere. Where should I put JS code in Marketo?
      4. How am I going to deploy this on our website?

       

      Thanks!

      Sule

        • Re: Google reCAPTCHA - Marketo Form
          Sanford Whiteman

          There's a lot to correct here.. I'm sorry to say, it's almost all wrong.

           

          The sequence of triggers and flow steps looks nearly backward... LastReCAPTCHAUserResponse should be a TextArea, not a String... and you absolutely need JS to make this work, though you didn't put any JS in your post, so I don't know what you mean by "following JS code"!

           

          I'm gonna predict you'll need a Marketo-fluent JS developer to get this working successfully and safely.  In a way, you're close, but there are fundamental parts you have to pull together.

            • Re: Google reCAPTCHA - Marketo Form
              Sule Arifagaoglu

              Thanks Sanford. I wrote the JS and then I didn't feel confident enough to post it. So you can ignore that question

              can you give me any other suggestion? 

                • Re: Google reCAPTCHA - Marketo Form
                  Sanford Whiteman

                  Have you looked at the sample page with the reCAPTCHA integrated into a Marketo form:  MktoForms2 :: reCAPTCHA ?

                   

                  That'll give you a leg up on the JS side, though precisely positioning the reCAPTCHA widget within your particular form layout might prove be annoying. (The position is merely cosmetic, since the widget doesn't even need to be inside the <form> element to be functional, but can be a blocker when it comes to rolling the thing out on a public site.)

                   

                  On the server side, you need to rethink your reasoning.

                   

                  • as noted, the field that holds the client-side (browser-side) response code needs to be longer than a String, thus needs to be a Textarea
                  • you wait for a change to the browser-side response code
                  • call the webhook when that field changes
                  • map the webhook response to your pass/fail boolean
                  • when the mapped response field changes, then you also stamp the LastPass/LastFail DateTime fields to the current {{system.datetime}}