4 Replies Latest reply on Feb 6, 2015 11:27 PM by Sanford Whiteman

    Storing URL Parameters UTM in cookie -- from landing page to our .com site

    JP Rastrullo
      Hi Marketo Community,

      I know there are variants of this question floating around in discussion, but none seem to answer my particular question...

      Let me draw out the scenario --

      If a user comes to a marketo landing page with UTMs in URL parameters, but the bounces from that page onto our main website (hosted by Drupal) -- how can we store the original referring UTMs into that user's cookie so once they come back and convert for the first time, I know what their originating URL was.

      Let me know what you think.
        • Re: Storing URL Parameters UTM in cookie -- from landing page to our .com site
          Edward Unthank (ETU)
          So long as the parent domains are the same (e.g., you have http://pages.etumos.com and http://etumos.com), session cookies would be the answer. If you have different parent domains (e.g., http://pages.etumos.com and http://etumosrocks.com), you're going to have to get craftier about transferring that data across domains. 

          Once you have the code to write UTM parameters to cookies, you can pull the info into hidden fields on your Marketo forms. 

          Or are you looking for the literal JS to achieve the writing from URL parameters to cookies, and then from cookies to hidden fields?
           

          Best,

          Edward Unthank | Founder, Etumos
          • Re: Storing URL Parameters UTM in cookie -- from landing page to our .com site
            JP Rastrullo
            HI Edward,

            Thanks for your reply...

            So currently, we have our landing pages hosted on Drupal embedded with a Marketo form. We have a mechanism in place implemented through Google Tag Manager that stores the original referring UTM through their cookies upon visit for 30 days -- so if someone came to a page from an ad, bounced around 2-3 pages, and then converted later on, the UTMs in the cookie would be passed through into the hidden fields.

            We are trying to leverage landing pages in Marketo for obvious reasons but lose the visibility if they bounce around and view different pages if they originated from a Marketo landing page...

            Is there any way that Munchkin, or some form of cookie tracking can storm the original UTM in a cookie from a Marketo landing page, and be used when they fill out a form on our regular website (drupal form)?

            Let me know what you think.


            Best,
            JP
            • Re: Storing URL Parameters UTM in cookie -- from landing page to our .com site
              Sanford Whiteman
              Is there any way that Munchkin, or some form of cookie tracking can storm the original UTM in a cookie from a Marketo landing page...

              To echo @Edward, no purely cookie-based tracking can pass values from pages.landingdomain.co.uk to www.jpr.com, because they do not share what I call the eSLD (effective second-level domain -- basically, the types of domains the public can register).  By contrast, pages.landingdomain.co.uk and www.landingdomain.co.uk share the eSLD landingdomain.co.uk, and www.jpr.com and jpr.com share the eSLD jpr.com.  

              If your sites share an eSLD, you can link cookies to the topmost eSLD, so they'll be shared across both sites (Munchkin does this by default).

              But if your Drupal pages and Marketo pages don't share an eSLD you have to find another way to pass tracking cookies around.  Since the Munchkin cookie is nice and small, you can actually pass it in the query string.  To do this, use JS to append the current Munchkin cookie value to all your hrefs (or all offsite links).  Then have the other site set a cookie with that value (if it doesn't already have one) before loading Munchkin.  You have to do some smart JS coding to make sure you use the "most known" Munchkin value, for example if a user is associated on Site 1 but anonymous on Site 2 you want to get the Site 1 cookie onto Site 2 but not vice versa.
              • Re: Storing URL Parameters UTM in cookie -- from landing page to our .com site
                Sanford Whiteman
                Also note that new, organic, anonymous hits to Site 1 -- as opposed to links followed between the sites -- won't be able to tell Site 1 about a cookie that might've been set by Site 2 unless you do some pretty fancy footwork with redirects.  I don't know how advanced you are as a developer but that too is possible.