How to set up conversion tracking for a Memberstack customer portal? Answered

Post author
Traf ‎

Hey guys! Would any of you know the simplest way to track conversion rates for a Memberstack site (conversion from landing page to Memberstack member)?

Comments

7 comments

  • Comment author
    Duncan from Memberstack
    • Edited
    • Official comment

    The after-checkout redirect now includes the price id from Memberstack and Stripe. 🎉

    https://xxx.webflow.io/<redirectURL>?forceRefetch=true&fromCheckout=true&msPriceId=prc_abc&st
  • Comment author
    Duncan from Memberstack
    • Edited

    Hi Traf! 👋

    After a successful checkout event Memberstack appends a bunch of data to the page URL. You should be able to use a tool like Google Analytics to track the total number of unique users who enter your site and then track the number of unique users who land on a page with your link param. 

    Here's a video to show exactly what I mean.

    And here's an example of that link parameter from my test site.

    0
  • Comment author
    William de Broucker

    Hello Duncan from Memberstack,

    Would that work in order to track the customer-portal sessions ?

    I'm trying to track a button with a ms-data-action=customer-portal but I cannot do it with GTM

    Thanks

    0
  • Comment author
    Chris Sidla

    Hi Duncan from Memberstack 

    I've noticed that now on test domains ...webflow.io after successful checkout link parameters are being showed only ...?forceRefetch=true&fromCheckout=true

    Is there a reason why? Or perhaps it's known how to get links with more metadata parameters? 

    Thannks!

    0
  • Comment author
    Théo Roland

    Hello everyone !
    I’m diving into Memberstack and I’m loving it so much ! Thanks for this incredible tool !

    To track conversion, I’ve setup GTM to start when my signup redirect page is loaded with a specific utm.
    To optimize, I would love to be able to send the email of the member as a second utm. How can I add dynamic member’s utm in the redirect url ?

    0
  • Comment author
    A J

    Hey Théo Roland, You can do that by placing this code in the custom code settings of the specific page you are redirecting the user to:

    <script> 

    document.addEventListener("DOMContentLoaded", function() { window.$memberstackDom.getCurrentMember().then(({ data: member }) => {
    if (member && member.auth.email) {
    const email = member.auth.email;
    const currentUrl = new URL(window.location.href);
    if (currentUrl.searchParams.get('utm_email') !== email) {
    currentUrl.searchParams.set('utm_email', email);
    window.location.href = currentUrl;
    }
    }
    });
    });
    </script>

    Hope this helps.

    0
  • Comment author
    Théo Roland

    Hey A J! I just remembered than I didn’t thank you !

    Thanks for your help ! The issue with this code is that it reload the page a second time so I modified it to send a webhook with the email of the member !

    Thanks again 😉

    Hava a great day !

    0

Please sign in to leave a comment.