1 Reply Latest reply on Mar 30, 2017 8:48 PM by Sanford Whiteman

    Please help!! Trying to integrate drupal 7 with Marketo

    Archana Ranjan

      For the cases browser disabled cookie only email id is sent in Marketo to create lead.

      A consultant who is building script for us is facing below challenge.

      There are two elements to the Marketo tracking cookie:

      1. 'id': EDB's Munchkin ID
      2. 'token': A tracking token that identifies the user

      The Marketo API says that the tracking token must match the data sent through Associate Lead packet (which contains a hash of your munchkin_api_private_key and the email address in the lead.)

      The approach that we tested yesterday was to check whether cookies were blocked, and when they were we created a variable called $_COOKIE['_mkto_trk'], containing only the 'id' element from above. Because there was no token that matched the hash, this approach was not successful.

      It may be possible to engineer a token to include in our $_COOKIE['_mkto_trk'] variable that will "match" the hash (the API says that the hash "corresponds to the browser’s current Marketo cookie value.") Without knowing what the nature of that correspondence is, we can't engineer such a token.

      Please ask the Marketo team how we can create a token that will have such a correspondence to the hash between the munchkin_api_private_key and the email address in the lead.

       

      What's the solution to pass complete lead information when browser cookie is disabled.

      Thanks.

        • Re: Please help!! Trying to integrate drupal 7 with Marketo
          Sanford Whiteman

          You're mixing together about 10 different things, and your question doesn't (yet) make sense.  You should step back and explain your exact requirements instead of guessing how things work, or should work.

           

          Munchkin sessions (maintained via the _mkto_trk cookie) are used to to log pageviews and link clicks, including fully anonymous activities. Once a session is associated with a lead in your Marketo database, those activities are in turn linked with the lead.  Association can occur via

           

          • filling out a form (manual association)
          • automatically posting a form if you know the lead's email (automatic association)
          • clicking a link in an email (also automatic association)
          • using the Munchkin API associateLead (secure programmatic association)
          • or using another programmatic association method (this last is not recommended)

           

          If you have no ability to transmit cookies from page to page (i.e. cookies and all other forms of local storage are disabled) you will not know that the person that viewed Page A later viewed Page B. Although you can craft a valid _mkto_trk value extremely easily, there's no advantage to doing so if you will not be able to use the same value over time.

           

          A Munchkin Associator Token, as I get into here, is a means of tying a particular _mkto_trk cookie to a Marketo lead. It's also a means of creating/updating a lead with custom fields populated. You can forge a random, valid _mkto_trk value easily, and then use that when making a synthetic Ajax call to the the associateLead endpoint. But I would not bother with this. It's too much work for zero payoff. Instead, an automatic background form post (from the client side -- do not do this from your server) can upsert a lead record.