6 Replies Latest reply on Apr 13, 2016 8:04 PM by Venus Wills

    Help with debugging Munchkin Javascript API

    Venus Wills

      Hello Marketo Community,

       

      We've created a third-party tool with a third-party (non-Marketo) form submission to capture email and make the AssociateLead call. Everything seems to be working correctly but none of the values are syncing back to Marketo, and a new lead is not created when the email doesn't exist. Below are our codes. The origin and referring URLs will not work.

       

      Javascript:

       

      mktoMunchkinFunction('associateLead', marketingResults, hashCode);

       

      PHP server-side code used to generate the hashCode:

       

      <?php

       

      if($_SERVER["REQUEST_METHOD"] == "POST") {

      $email = $_REQUEST["email"];

      $hash_code = hash('sha1', '############'.$email);

      header('Content-Type: application/json');

      // echo json_encode($hash_code);

      wp_send_json($hash_code);

      die;

      }

      ?>

       

       

      Here is the request to and response from Marketo for the associateLead call:

       

       

      Request URL:

       

      https://381-kpd-482.mktoresp.com/webevents/associateLead?_mchNc=1460152334365&_mchKy=2c1ba96f9aaf0adb933612aaa2dcc4c19ffcf39f&_mchAtfirstName=Joel&_mchAtlastName=Doyle&_mchAtemail=joel%40few.io&_mchAtcompany=Few&_mchAttoolSCComplianceNeeds=No&_mchAttoolSCEncrypt=No

       

      Request Method:

       

      GET

       

      Status Code:

       

      200 OK

      Response Headersview source

      Access-Control-Allow-Origin:

       

      Cache-Control:

       

      no-cache

       

      Connection:

       

      Keep-Alive

       

      Content-Length:

       

      43

       

      Content-Type:

       

      image/gif

       

      Date:

       

      Fri, 08 Apr 2016 21:52:14 GMT

       

      Expires:

       

      -1

       

      Keep-Alive:

       

      timeout=5, max=100

       

      Last-Modified:

       

      Fri, 08 Apr 2016 16:52:14 -0500

       

      P3P:

       

      policyref="http://www.marketo.com/w3c/p3p.xml", CP="NOI DSP COR NID CURi OUR NOR"

       

      Pragma:

       

      no-cache

       

      Server:

       

      Apache

       

      Set-Cookie:

       

      BIGipServersjlweb-mch_https=!ucaFc7ZN3LX0XfJEgmpKKdFIW06sxEP98mhC9P2cxvyGImMK0Jxnfp8njkiV7LHp/f9zb6X2gmOC8GY=; path=/

       

      X-Content-Type-Options:

       

      nosniff

      Request Headersview source

      Accept:

       

      */*

       

      Accept-Encoding:

       

      gzip, deflate, sdch

       

      Accept-Language:

       

      en-US,en;q=0.8

       

      Connection:

       

      keep-alive

       

      Host:

       

      381-kpd-482.mktoresp.com

       

      Origin:

       

      https://stage.armor.com

       

      Referer:

       

      https://stage.armor.com/resources/solution-configuration-tool/

       

      User-Agent:

       

      Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.87 Safari/537.36

      Query String Parametersview sourceview URL encoded

      _mchNc:

       

      1460152334365

       

      _mchKy:

       

      2c1ba96f9aaf0adb933612aaa2dcc4c19ffcf39f

       

      _mchAtfirstName:

       

      Joel

       

      _mchAtlastName:

       

      Doyle

       

      _mchAtemail:

       

      joel@few.io

       

      _mchAtcompany:

       

      Few

       

      _mchAttoolSCComplianceNeeds:

       

      No

       

      _mchAttoolSCEncrypt:

       

      No

       

      _mchId:

       

      381-KPD-482

       

      _mchTk:

       

      _mch-armor.com-1458070455961-21585

       

      _mchHo:

       

      stage.armor.com

       

      _mchPo:

       

      _mchRu:

       

      /resources/solution-configuration-tool/

       

      _mchPc:

       

      https:

       

      _mchVr:

       

      151