4 Replies Latest reply on Dec 21, 2017 8:20 AM by Jared Kimball

    Munchkin code across multiple domains, brands and partitions?

    Jared Kimball

      We are trying to get our Munchkin code setup and tracking our customers properly but are running into a bit of snag.

       

      Here's a simplified flowchart of how we use multiple brands and websites. The end goal is we want one person's web activity to be tracked within that brand when they visit multiple unique domain names that we control:

       

      Screen Shot 2017-12-14 at 12.52.00 PM.png

       

      Scenario:

      Let's say we are trying to monitor the web journey of one Person in Brand 1 and would look something like this:

       

      Send email > Click email link > Visit www.brand2.com (with Workspace/Partition BRAND 1 Munchkin script) > Click www.sharedsite.com link > Visit www.sharedsite.com/page-1 (with Workspace/Partition DEFAULT Munchkin script) > visit www.sharedsite.com/page-1/sub-page (with Workspace/Partition DEFAULT Munchkin script)> etc.

       

      Would we use the Associate Lead API Call to make sure that this Person's web visits are tracked and recorded under their Activity History in BRAND 1 & DEFAULT?

       

      If not, how would we go about this?

       

      Thanks.

        • Re: Munchkin code across multiple domains, brands and partitions?
          Sanford Whiteman

          The Associate Lead API method (I hope you mean the Munchkin API associateLead, since the REST API categorically must not be used in this context) only works if you know the lead's identity and their Munchkin associator token (hash). This isn't going to be the case unless a site knows who someone is via other means, like an extranet/ecommerce/CMS login.

           

          What you're dealing with here isn't really a Marketo/Munchkin issue, it's a basic browser security issue and one which affects all cookie-based tracking. A Munchkin cookie on Domain B -- whether anonymous or associated -- will never be passed to Domain C unless B and C share a private domain suffix (e.g. are both under or at example.co.uk).

           

          If you control all of the entry points to Domain C (there is zero direct traffic to C) then you can append the Munchkin cookie value to the query string of all exit links from B. Anyone going from B to C will be implicitly passing their Munchkin cookie value to C, where it can be reused. So if their web session on B is associated, that association will carry over to C and tracking will continue.*  Of course this kind of tight control is rare, but if you have it, you can take advantage of the closed environment.

           

          If you don't control all the ways you can get to B and C (and D and E) independently, you will need to enlist a skilled JS developer to create a cross-domain tracking solution on top of Munchkin. This is rarely embarked on, but has its rewards.

           

           

          * Note this isn't actually "passing the cookie," since that is still explicitly impossible in all browsers, but it allows you to pass the cookie value via other means.

            • Re: Munchkin code across multiple domains, brands and partitions?
              Jared Kimball

              Thanks Sanford,

               

              We do control all of the entry points to Domain C, currently the only way our customers/leads can access Domain C is either by logging into the membership site, and then clicking thru to Domain C or we send an email and pass their login credentials straight to Domain C so they are automatically logged in and taken to a specific product page.

               

              When you say "pass the cookie value via other means" what would I tell the developer to do? Would the link look something like this, "www.searchsite.com/page-1/mkto-value"

               

              Is there a way for us to do this via email too?

               

              Thanks for your help.

                • Re: Munchkin code across multiple domains, brands and partitions?
                  Sanford Whiteman

                  currently the only way our customers/leads can access Domain C is either by logging into the membership site, and then clicking thru to Domain C

                  Then you should use Munchkin associateLead to associate the cookie on Domain B (the membership site), then pass the cookie value over to Domain C in the query string or hash.

                   

                  or we send an email and pass their login credentials straight to Domain C so they are automatically logged in and taken to a specific product page.

                  Clicking a tracked link in a Marketo email that takes them to a web page on Domain C will automatically associate their Munchkin session on Domain C.

                   

                  When you say "pass the cookie value via other means" what would I tell the developer to do? Would the link look something like this, "www.searchsite.com/page-1/mkto-value"

                  Not likely in the /path unless your web server is configured to ignore path segments after /page-1.

                   

                  More like in the query string (page-1?_mkto_trk=2132368724687) or hash (page-1#_mkto_trk:2132368724687).