5 Replies Latest reply on Oct 4, 2018 10:02 AM by Sanford Whiteman

    Google reCAPTCHA - Marketo Form

    Sule Arifagaoglu-Tatar

      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-Tatar

              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}}
                    • Re: Google reCAPTCHA - Marketo Form
                      Sule Arifagaoglu-Tatar

                      Hi Sanford,
                      Yes, I had reviewed sample page before I created this thread, from my point of view, that article missing lots of parts.

                      Other day, I have seen another thread. Grégoire Michel explained here step-by-step which is great. Thanks Gregoire!

                      But I don't think my server side is working properly.

                      Since Java is case sensitive, I'll double check all my fields' API names rather than that can you think of any other common mistake?

                       

                      Thanks!

                      Sule

                        • Re: Google reCAPTCHA - Marketo Form
                          Sanford Whiteman

                          But I don't think my server side is working properly.

                          It's not really something to think or not think. What do the webhook responses say?  What updates have you made to your setup since the first set of screenshots, which I mentioned didn't make sense?

                           

                          Since Java is case sensitive, I'll double check all my fields' API names

                          You're using JavaScript, not Java, here. And make sure you're using the SOAP API names (not REST).

                           

                          (And actually, Marketo's back end isn't written in JavaScript. It happens to be case-sensitive, but that's simply the default in programming, not directly related to JS.)