How to properly implement fbclid parameter persistence in Memberstack for Facebook Conversion API?

Post author
Founder Show

Hey guys,

I’m trying to add and pass the PARAMS in the URL String at signup, to pass the fbclid parameters to someone who completes a successfull checkout, to track FB conversions using the Conversion API

  • I have created a custom field in the members area “fbclid”

Name = data-ms-member
ID = fbclid

  • I’m capturing and storing fbclid on initial visit (added some code in webflow footer)
  • passing the fbclid to memberstack during signup (added a hidden code in the signup form)

<input type=“hidden” data-ms-member=“fbclid” value=“”>

  • Configured Memberstack to Use the Stored fbclid in Redirects like this:

/app/home?fbclid={member.customFields.fbclid}

I’m not able to capture the fbclid in the URL string, post the successful checkout process

is this the correct way of doing this?

Comments

4 comments

  • Comment author
    Raquel Lopez
    • Configured Memberstack to Use the Stored fbclid in Redirects like this:
      The the redirect input field only accepts plain text.If you want to track conversions, you don’t need to store fbclid on the user profile. Instead, you can handle it on the frontend:
    1. Capture the signup event.

    2. Redirect with the required parameters or send a conversion event to your analytics platform.
      The code would look more or less like this
    document.querySelector('#yourform').addEventListener('submit', async (event) => {
    event.preventDefault(); // Prevent default form submission

    const formData = new FormData(event.target); // Get form data
    const res = await memberstack.signupWithEmailAndPassword(Object.fromEntries(formData));

    if (res) {
    // Redirect or send conversion event
    window.location.href = redirectUrl;
    }
    });

    Here are the docs for the signup method
    https://developers.memberstack.com/docs/dom-front-end-package#signing-up-a-member-using-email-and-password

    That would mean that you won't need to use the data attributes memberstack gives you to handle the signup form for you because you are managing it to suit your needs
     
    Sorry. I assumed you were a developer because you mentioned api and sending variables through url params. For marketing people is better recommended to use Google Tag Manager. This platform acts as an intermediary between your page and any tracking system that you want to send metrics to.

    https://www.analyticsmania.com/post/facebook-conversion-tracking-google-tag-manager/You can create a page that only sends the sign up metric when landing there. And redirect to all the users when they sign up there

    0
  • Comment author
    Founder Show

    thanks, i’ve already set this up, but i was looking to improve my conversion tracking using the server side integration.

    0
  • Comment author
    Raquel Lopez

    To send server side analytics you will need to setup a server. I wouldn’t recommend you to do them if you don’t know how to program it. That’s more advanced topics dedicated to developers.

    0
  • Comment author
    Founder Show

    Ok

    Thanks

    0

Please sign in to leave a comment.