Memberstack With Stripe

You use Memberstack with Stripe as payment processor

Ayo AbdulLast Updated June 26, 2025

Follow all steps listed to integrate Memberstack tracking

Step 1: Tracking Clicks

Insert the following script in your website's <head> tag to start tracking clicks:

Normal Method

<script 
  src="https://pushlapgrowth.com/affiliate-tracker.js" 
  data-affiliate 
  data-program-id="YOUR_AFFILIATE_PROGRAM_ID" 
  async>
</script>

Using Google Tag Manager

<script>
  var pushLap = document.createElement('script');
  pushLap.src = "https://pushlapgrowth.com/affiliate-tracker.js";
  pushLap.setAttribute('data-affiliate', '');
  pushLap.setAttribute('data-program-id', 'YOUR_AFFILIATE_PROGRAM_ID');
  document.head.appendChild(pushLap);
</script>

Step 2: Create a custom field in Memberstack

Create a custom field in your Memberstack dashboard by going to Members -> Custom Fields -> Add a custom field

Enter these values:
Custom Field Name: pushlapaffiliateid
Hide from Pre-built UI: Yes

Step 3: Send Affiliate ID to Memberstack

Send the Push Lap Affiliate Id to Memberstack using the custom field (pushlapaffiliateid) you created in step 2.

Note: You need to have the Memberstack script installed on your website to be able to do this.

The Push Lap Affiliate Id can be received from the script that was added in step 1. To access this ID, use window.affiliateId.

Send the Push Lap Affiliate Id to Memberstack by inserting this code in your head tag on every page of your website that has access to memberstack:

Using client_reference_id

<script>
  function injectPushLapAffiliateId() {
    const pushLapAffiliateId = window.affiliateId;

    if (pushLapAffiliateId) {
      const memberstack = window.$memberstackDom;
      memberstack.onAuthChange(async (member) => {
      if (member && member.data?.customFields?.pushlapaffiliateid !== pushLapAffiliateId) {
        const newMemberStack = window.$memberstackDom;
          try {
            // Add delay before updating member
            await new Promise(resolve => setTimeout(resolve, 2000)); // 2 second delay
            
            const result = await newMemberStack?.updateMember({
              customFields: {
                pushlapaffiliateid: pushLapAffiliateId
              }
            });
          } catch (error) {
          }
        } else {
        }
      })
      memberstack.getCurrentMember().then((member) => {
        if (member?.data && member.data?.customFields?.pushlapaffiliateid !== pushLapAffiliateId) {
          memberstack?.updateMember({
            customFields: {
              pushlapaffiliateid: pushLapAffiliateId
            }
          }).then((result) => {
          }).catch((error) => {
          });
        }
      })
    
    }
  }
  window.addEventListener("affiliate_referral_ready", injectPushLapAffiliateId);
</script>

Step 4: Connect Stripe

To proceed, connect your Stripe account by going to Dashboard → Integrations → Connect payment processor → Stripe. (Please complete the whole stripe connection flow to have your affiliate program connected to your stripe account)

Step 5: Create and setup Webhook to track sign ups from Memberstack

Create a new endpoint for Memberstack to send events to. You can do this in your Memberstack dashboard by going to Dev Tools -> Webhooks -> Add Endpoint

Endpoint URL: https://www.pushlapgrowth.com/api/webhooks/memberstack?program_id=fc96bb84-278c-4b44-bcd1-9ec9fb816505

Webhook Description: Push Lap Growth Integration

Choose the following events:

  • member.updated

Summary

By following these steps, you can successfully integrate Stripe with Push Lap Growth for accurate affiliate tracking.

Did this answer your question?
© 2025 Push Lap Growth - Track, Manage and Find Affiliates