Skip to main content

How to label Memberstack members by signup source for targeted emails and fix registration popup issue?

Hi everyone! Loving Memberstack, it's an awesome tool. I have a question (bear with me, I'm new to this). Is there a way to add tags to Members? What I mean is, when adding new users through different forms, can I mark them somehow to later be able to see where they came from, (I'd like to later target them with Email campaigns)?

5 comments

  • Chukwudi
    Chukwudi

    Hi Daniela,

    Yes, this is possible. 🙂 You will have to make use of Custom fields, and some custom code to get it to work. This is an example of one I created for a customer and the steps I took:

    1. Create Custom Fields on your Memberstack dashboard. In this example, I created utm-source, utm-campaign, utm-medium, utm-term, and gclid
    2. I added hidden the HTML Fields code snippet below within the signup form. Here's an article I found on how to do that: Adding Hidden Fields to Webflow
    <input type="hidden" id="utm-source" name="utm-source" value="" data-ms-member="utm-source">
    <input type="hidden" id="utm-campaign" name="utm-campaign" value="" data-ms-member="utm-campaign">
    <input type="hidden" id="utm-medium" name="utm-medium" value="" data-ms-member="utm-medium">
    <input type="hidden" id="utm-term" name="utm-term" value="" data-ms-member="utm-term">
    <input type="hidden" id="gclid" name="gclid" value="" data-ms-member="gclid">
    1. Finally, I added the following Javascript code snippet:
    <script>
    document.addEventListener("DOMContentLoaded", async function () {
    // Shorten reference to Memberstack
    const urlParams = new URLSearchParams(window.location.search);
    const utmSource = urlParams.get("utm_source");
    const utmMedium = urlParams.get('utm_medium');
    const utmCampaign = urlParams.get('utm_campaign');
    const utmTerm = urlParams.get('utm_term'); // Fixed duplicate variable name
    const gclid = urlParams.get('gclid');
    // Set utmSource in the hidden field
    document.getElementById("utm-source").value = utmSource;

    // Set utmMedium in the hidden field
    document.getElementById("utm-medium").value = utmMedium; // Set utmCampaign in the hidden field
    document.getElementById("utm-campaign").value = utmCampaign; // Set utmTerm in the hidden field
    document.getElementById("utm-term").value = utmTerm; // Set gclid in the hidden field
    document.getElementById("gclid").value = gclid;
    });
    </script>

    With this setup, when a user signs up with a link like this yourwebsite.com/signup?utm_source=facebook&utm_campaign=whatever, the data in the URL will be saved to Memberstack alongside other inputs in the signup form.

    This is a short video of me implementing the code: https://www.loom.com/share/8d62f50226694bc4bdacba64ca535a2c

    Please note that you may have to modify the custom fields in the code to suit yours.

    0
  • Nela (Daniela Kersting)
    Nela (Daniela Kersting) OP

    Awesome, thank you for that extensive walkthrough. I'll give it a try right now!

    0
  • Chukwudi
    Chukwudi

    You're welcome 😌. Do not hesitate to reach out if you have any challenges.

    0
  • Verity Hall
    Verity Hall

    Hi team, please can you advise how to prevent the Memberstack user registration module (not used on the site) flashing up when users click on Register on my webflow site?

    0
  • Chukwudi
    Chukwudi

    Hello,

    You'd have to remove the data-ms-modal="login" or data-ms-modal="signup" to fix that. If the issue persists, please share the link to your registration page so I can investigate further.

    0

Please sign in to leave a comment.

Sitemap