1 Reply Latest reply on May 31, 2018 9:52 AM by Sanford Whiteman

    Passing a query string to the thank you page

    Malik Zafar

      so we need to track conversions for LinkedIn based on Thank You Page, however we use this specific thank you page for multiple landing pages.

       

      i think the solution here is to pass a querystring to the thank you page so that the URL is unique.

       

      is there a way to get this done via MKTO?

       

       

      and while on the topic of thank you pages, what is the best practice here? should you have a unique thank you page per landing page, or is it okay to use "master" thank you pages based on channels for example

      - thank you PPC

      - thank you event

      - thank you webinar

      - thank you asset download

      - thank you main form contact

        • Re: Passing a query string to the thank you page
          Sanford Whiteman

          should you have a unique thank you page per landing page, or is it okay to use "master" thank you pages based on channels for example

          Try to have as few Thank You pages as possible. Preferably only one (it can switch based on querystring content). The wild proliferation of Forms and Thank Yous is a primary cause of instances becoming unmanageable.

           

          i think the solution here is to pass a querystring to the thank you page so that the URL is unique.

           

          is there a way to get this done via MKTO?

          Of course.

           

          MktoForms2.whenReady(function(form){
            form.onSuccess(function(vals,thankYouURL){
              var thankYouLoc = document.createElement("a"),
                  currentLoc = document.location;
              thankYouLoc.href = thankYouURL;
              thankYouLoc.search += "&prev=" + encodeURIComponent(document.location.href);
              document.location = thankYouLoc;
              return false;
            });
          });
          

           

          The original referring page will then be in the prev query parameter.

           

          Bear in mind the referrer (document.referrer) is also automatically available via JS on the Thank You page. Depending on how conversion pixels are loaded they can just read the referrer, no need for it to be echoed in the QS.