Membership2 Custom Thank You Pages

My question is how can I redirect specific memberships membership specific thank you pages.

Free member TY Page - /registration-complete/
Paid Package 1 TY Page - /registration-complete-1/
Paid Package 2 TY Page - /registration-complete-2/

and so forth...

I have scoured the forum / google and cannot find a straight answer to this question. My client has several different membership types that all end up at /registration-complete/ since its a shared TY page I cannot differentiate between sign up values. You have completed registration URL that is contains a membership id parameter and GA doesn't want to track those parameters on a destination goal. If i could track that redirect it would work but not be ideal, because it tracks a completed registrations not payments.

  • Adam Czajczyk

    Hello RyanH,

    I hope you're well today and thank you for your question!

    That can be achieved with a little "workaround". Here are the steps:

    1. Create your "thank you" pages for all the memberships and note down their full URLs (no need to change "Thank You" page setting in Membership 2 configuration though).

    2. Go to "Membership 2 -> Memberships" page and note down IDs of all memberships (you'll find them when you hover cursor over membership name or click on "Show" link in "Shortcodes" column).

    3. Create an empty file named "m2-registration-complete-123.php", replacing "123" with an ID of one of the memberships.

    4. Put following code inside that file:

    <?php
    wp_redirect('YOUR_URL');
    ?>

    replacing YOUR_URL with an URL of a relevant "Thank You" page for this membership that you created in step 1.

    5. Upload the file to your current theme's folder (or better yet, create a child theme and put that file there).

    6. Repeat steps 3 to 5 for each membership

    As a result a user that signs up for a membership will be automatically redirected to selected - separate - "Thank You" page for each membership. I think that should let you easily find out stats for these pages in GA.

    I hope that helps!

    Best regards,
    Adam

    • Predrag Dubajic

      Hi Robert,

      If you have access to your WP installation via FTP or cPanel you can create new file from there, set the name as adam mentioned above and make sure that file extension is set to .php.

      You can also create the file on your PC, default text editor like Notepad will do, or you can use additional program like SublmiteText for example.

      Once the file is created and the above mentioned code is added follow the rest of steps to place it in correct folder and that should be it.

      If you need additional help with this could you please start a new thread so we don't spam original poster with thread notifications.
      You can link this thread in your new one and we'll gladly assist you further with this :slight_smile:

      You can start a new thread here:
      http://premium.wpmudev.org/forums/#question

      Best regards,
      Predrag

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.